Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3009)

Unified Diff: chrome/browser/ui/browser.h

Issue 7461059: Fullscreen JS API implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: respond to comments Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/browser.cc » ('j') | chrome/browser/ui/browser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.h
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index b4c98c9173edebbce7419eb1e347c97530873d0b..ef740550399ce87edd7aabc94d6fc416910a0a7e 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,25 @@ 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();
+
// OnBeforeUnload handling //////////////////////////////////////////////////
typedef std::set<TabContents*> UnloadListenerSet;
@@ -1126,6 +1147,7 @@ class Browser : public TabHandlerDelegate,
// BrowserWindow if necessary.
void UpdateBookmarkBarState(BookmarkBarStateChangeReason reason);
+
// Data members /////////////////////////////////////////////////////////////
NotificationRegistrar registrar_;
@@ -1265,6 +1287,12 @@ class Browser : public TabHandlerDelegate,
BookmarkBar::State bookmark_bar_state_;
+ // Tab to notify when the browser exits fullscreen mode.
+ TabContentsWrapper* fullscreened_tab_;
+
+ // True if the current tab is in fullscreen mode.
+ bool tab_caused_fullscreen_;
+
DISALLOW_COPY_AND_ASSIGN(Browser);
};
« no previous file with comments | « no previous file | chrome/browser/ui/browser.cc » ('j') | chrome/browser/ui/browser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698