In Hartshorne's Algebraic Geometry, page 103, a morphism $f: X \rightarrow Y$ is said to be projective if it factors as a closed immersion $X \rightarrow {\bf P}^n_Y$ followed by the projection ${\bf P}^n_Y \rightarrow Y$. As noted there, EGA II, 5.5 has another definition, namely $f$ is projective if it factors as a closed immersion $X \rightarrow {\bf P}(\cal E)$ followed by the projection map, where $\cal E$ is finite-type quasi-coherent ${\cal O}_Y$-module.
Hartshorne states without proof nor reference that the two definitions "are equivalent in case $Y$ itself is quasi-projective over an affine scheme".
My question is: does anyone know a proof or a reference for this statement? And if not: is it correct?