Code: void Browser::ToggleFullscreenModeForTab(TabContents* tab,
    bool enter_fullscreen) {
  if (tab != GetSelectedTabContents())
     return;
   fullscreened_tab_ = enter_fullscreen ?
       TabContentsWrapper::GetCurrentWrapperForContents(tab) : NULL;
  if (enter_fullscreen && !window_->IsFullscreen())
     tab_caused_fullscreen_ = true;
  if (tab_caused_fullscreen_)
     ToggleFullscreenMode();
 }

Vulnerability Type: DoS Overflow 
CWE ID: CWE-119
Summary: Buffer overflow in Google Chrome before 15.0.874.120 allows remote attackers to cause a denial of service or possibly have unspecified other impact via vectors related to shader variable mapping.
Commit Message: Implement a bubble that appears at the top of the screen when a tab enters 
fullscreen mode via webkitRequestFullScreen(), telling the user how to exit 
fullscreen. 

This is implemented as an NSView rather than an NSWindow because the floating 
chrome that appears in presentation mode should overlap the bubble. 

Content-initiated fullscreen mode makes use of 'presentation mode' on the Mac: 
the mode in which the UI is hidden, accessible by moving the cursor to the top 
of the screen. On Snow Leopard, this mode is synonymous with fullscreen mode. 
On Lion, however, fullscreen mode does not imply presentation mode: in 
non-presentation fullscreen mode, the chrome is permanently shown. It is 
possible to switch between presentation mode and fullscreen mode using the 
presentation mode UI control. 

When a tab initiates fullscreen mode on Lion, we enter presentation mode if not 
in presentation mode already. When the user exits fullscreen mode using Chrome 
UI (i.e. keyboard shortcuts, menu items, buttons, switching tabs, etc.) we 
return the user to the mode they were in before the tab entered fullscreen. 

BUG=14471
TEST=Enter fullscreen mode using webkitRequestFullScreen. You should see a bubble pop down from the top of the screen. 

Need to test the Lion logic somehow, with no Lion trybots. 
BUG=96883


Original review http://codereview.chromium.org/7890056/
TBR=thakis

Review URL: http://codereview.chromium.org/7920024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101624 0039d316-1c4b-4281-b951-d872f2087c98