We introduce a pre-symplectic structure on the space of connections in a G-principal bundle over a four-manifold and a Hamiltonian action on it of the group of gauge transformations that are trivial on the boundary. The moment map is given by the square of curvature so that the 0-level set is the space of flat connections. Thus the moduli space of flat connections is endowed with a pre-symplectic structure. In case when the four-manifold is null-cobordant we shall construct, on the moduli space of connections, as well as on that of flat connections, a hermitian line bundle with connection whose curvature is given by the pre-symplectic form. This is the Chern-Simons pre-quantum line bundle. The group of gauge transformations on the boundary of the base manifold acts on the moduli space of flat connections by an infinitesimally symplectic way. When the base manifold is a 4-dimensional disc we show that this action is lifted to the pre-quantum line bundle by its abelian extension. The geometric description of the latter is related to the 4-dimensional Wess-Zumino-Witten model. The previous version of this arxiv text had several incoincidence with the published article in the Differential Geometry and its Applications vol.29, so the author corrected them.