| Index: chrome/browser/ui/browser.h
|
| diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
|
| index b4c98c9173edebbce7419eb1e347c97530873d0b..d3ce5f29f96394aa7e0a12db3fcd0b7d74992ce8 100644
|
| --- a/chrome/browser/ui/browser.h
|
| +++ b/chrome/browser/ui/browser.h
|
| @@ -880,6 +880,8 @@ class Browser : public TabHandlerDelegate,
|
| virtual void DidNavigateToPendingEntry(TabContents* tab) OVERRIDE;
|
| virtual content::JavaScriptDialogCreator*
|
| GetJavaScriptDialogCreator() OVERRIDE;
|
| + virtual void ToggleFullscreenModeForTab(TabContents* tab,
|
| + bool enter_fullscreen) OVERRIDE;
|
|
|
| // Overridden from TabContentsWrapperDelegate:
|
| virtual void OnDidGetApplicationInfo(TabContentsWrapper* source,
|
| @@ -1006,6 +1008,29 @@ class Browser : public TabHandlerDelegate,
|
| // >= index.
|
| void SyncHistoryWithTabs(int index);
|
|
|
| + // Tab fullscreen functions /////////////////////////////////////////////////
|
| +
|
| + // There are two different kinds of fullscreen mode - "tab fullscreen" and
|
| + // "browser fullscreen". "Tab fullscreen" refers to when a tab enters
|
| + // fullscreen mode via the JS fullscreen API, and "browser fullscreen"
|
| + // refers to the user putting the browser itself into fullscreen mode from
|
| + // the UI. The difference is that tab fullscreen has implications for how
|
| + // the contents of the tab render (eg: a video element may grow to consume
|
| + // the whole tab), whereas browser fullscreen mode doesn't. Therefore if a
|
| + // user forces an exit from fullscreen, we need to notify the tab so it can
|
| + // stop rendering in its fullscreen mode.
|
| +
|
| + // Make the current tab exit fullscreen mode if it is in it.
|
| + void ExitTabbedFullscreenModeIfNecessary();
|
| +
|
| + // Notifies the tab that it has been forced out of fullscreen mode if
|
| + // necessary.
|
| + void NotifyTabOfFullscreenExitIfNecessary();
|
| +
|
| + // Enters / exits fullscreen mode because a tab has requested it.
|
| + void EnterFullscreenModeForTab(TabContents* tab);
|
| + void ExitFullscreenModeForTab(TabContents* tab);
|
| +
|
| // OnBeforeUnload handling //////////////////////////////////////////////////
|
|
|
| typedef std::set<TabContents*> UnloadListenerSet;
|
| @@ -1126,6 +1151,7 @@ class Browser : public TabHandlerDelegate,
|
| // BrowserWindow if necessary.
|
| void UpdateBookmarkBarState(BookmarkBarStateChangeReason reason);
|
|
|
| +
|
| // Data members /////////////////////////////////////////////////////////////
|
|
|
| NotificationRegistrar registrar_;
|
| @@ -1265,6 +1291,13 @@ class Browser : public TabHandlerDelegate,
|
|
|
| BookmarkBar::State bookmark_bar_state_;
|
|
|
| + // Whether the current tab should be notified if the browser exits
|
| + // fullscreen.
|
| + bool notify_tab_of_fullscreen_exit_;
|
| +
|
| + // True if the current tab is in fullscreen mode.
|
| + bool tab_caused_fullscreen_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(Browser);
|
| };
|
|
|
|
|