It's not like there's a lot of freedom on how to express headset orientation. Every headset so far provides a quaternion you can poll. The word from developers like Northway Games with Fantastic Contraption is that even hand-motion controllers like the Vive and Oculus Touch are providing nearly identical interfaces.
No, you won't have literal one-to-one code, at least outside of WebVR. But I highly doubt porting is going to be that hard.
If anything, because you have to do the graphics on your own, there is an even greater chance of successfully building cross-platform systems. At the end of the day, it's all just GLSL.