Hi,
The function that gets this is Editor__GetGameViewSize
Unfortunately it uses reflection to get this data from Unity, which is different in Unity 4.3+ and prior versions... I can't remember what does what in there, but you can work it out by printing out the values in there (eg. gvSizeType, and viewModeStrings), you'll figure out which codepath is running and what is being returned there. Sorry I can't be of more help but I cant remember.