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
void Browser::RegisterIntentHandlerHelper(TabContents* tab,
                                          const string16& action,
                                          const string16& type,
                                          const string16& href,
                                          const string16& title) {
  TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents(
      tab);
  if (!tcw || tcw->profile()->IsOffTheRecord())
    return;

  if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebIntents))
    return;

  GURL service_url(href);
  if (!service_url.is_valid()) {
    const GURL& url = tab->GetURL();
    service_url = url.Resolve(href);
  }

  WebIntentData intent;
  intent.service_url = service_url;
  intent.action = action;
  intent.type = type;
  intent.title = title;
  tcw->infobar_tab_helper()->AddInfoBar(
      new RegisterIntentHandlerInfoBarDelegate(tab, intent));
}

void Browser::RegisterIntentHandlerHelper(TabContents* tab,
                                          const string16& action,
                                          const string16& type,
                                          const string16& href,
                                          const string16& title) {
  TabContentsWrapper* tcw = TabContentsWrapper::GetCurrentWrapperForContents(
      tab);
  if (!tcw || tcw->profile()->IsOffTheRecord())
    return;

  if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebIntents))
    return;

  GURL service_url(href);
  if (!service_url.is_valid()) {
    const GURL& url = tab->GetURL();
    service_url = url.Resolve(href);
  }

  WebIntentData intent;
  intent.service_url = service_url;
  intent.action = action;
  intent.type = type;
  intent.title = title;
  tcw->infobar_tab_helper()->AddInfoBar(
      new RegisterIntentHandlerInfoBarDelegate(tab, intent));
}
