Constraining the Contribution of Galaxies and Active Galactic Nuclei to Cosmic Reionization