  The widely existing shallow decay phase of the X-ray afterglows of gamma-ray
bursts (GRBs) is generally accepted to be due to long-lasting energy injection.
The outflows carrying the injecting energy, based on the component that is
dominative in energy, fall into two possible types: baryon-dominated and
lepton-dominated ones. The former type of outflow could be ejecta that is
ejected during the prompt phase of a GRB and consists of a series of baryonic
shells with a distribution of Lorentz factors, and the latter type could be an
electron-positron-pair wind that is driven by the post-burst central engine. We
here provide a unified description for the dynamics of fireballs based on these
two types of energy injection, and calculate the corresponding high-energy
photon emission by considering synchrotron radiation and inverse Compton
scattering (including synchrotron self-Compton and combined inverse-Compton) of
electrons. We find that, in the two energy-injection models, there is a plateau
(even a hump) in high-energy light curves during the X-ray shallow decay phase.
In particular, a considerable fraction of the injecting energy in the
lepton-dominated model can be shared by the long-lasting reverse shock since it
is relativistic. Furthermore, almost all of the energy of the reverse shock is
carried by leptons, and thus the inverse-Compton emission is enhanced
dramatically. Therefore, this model predicts more significant high-energy
afterglow emission than the baryon-dominated model. We argue that these
observational signatures would be used to discriminate between different
energy-injection models in the upcoming {\em Gamma-ray Large Area Space
Telescope} (GLAST) era.

Astrophysics