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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/browser.cc » ('j') | chrome/browser/ui/browser.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_BROWSER_H_ 5 #ifndef CHROME_BROWSER_UI_BROWSER_H_
6 #define CHROME_BROWSER_UI_BROWSER_H_ 6 #define CHROME_BROWSER_UI_BROWSER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 const history::HistoryAddPageArgs& add_page_args, 873 const history::HistoryAddPageArgs& add_page_args,
874 NavigationType::Type navigation_type) OVERRIDE; 874 NavigationType::Type navigation_type) OVERRIDE;
875 virtual void ContentRestrictionsChanged(TabContents* source) OVERRIDE; 875 virtual void ContentRestrictionsChanged(TabContents* source) OVERRIDE;
876 virtual void RendererUnresponsive(TabContents* source) OVERRIDE; 876 virtual void RendererUnresponsive(TabContents* source) OVERRIDE;
877 virtual void RendererResponsive(TabContents* source) OVERRIDE; 877 virtual void RendererResponsive(TabContents* source) OVERRIDE;
878 virtual void WorkerCrashed(TabContents* source) OVERRIDE; 878 virtual void WorkerCrashed(TabContents* source) OVERRIDE;
879 virtual void DidNavigateMainFramePostCommit(TabContents* tab) OVERRIDE; 879 virtual void DidNavigateMainFramePostCommit(TabContents* tab) OVERRIDE;
880 virtual void DidNavigateToPendingEntry(TabContents* tab) OVERRIDE; 880 virtual void DidNavigateToPendingEntry(TabContents* tab) OVERRIDE;
881 virtual content::JavaScriptDialogCreator* 881 virtual content::JavaScriptDialogCreator*
882 GetJavaScriptDialogCreator() OVERRIDE; 882 GetJavaScriptDialogCreator() OVERRIDE;
883 virtual void ToggleFullscreenModeForTab(TabContents* tab,
884 bool enter_fullscreen) OVERRIDE;
883 885
884 // Overridden from TabContentsWrapperDelegate: 886 // Overridden from TabContentsWrapperDelegate:
885 virtual void OnDidGetApplicationInfo(TabContentsWrapper* source, 887 virtual void OnDidGetApplicationInfo(TabContentsWrapper* source,
886 int32 page_id) OVERRIDE; 888 int32 page_id) OVERRIDE;
887 virtual void OnInstallApplication( 889 virtual void OnInstallApplication(
888 TabContentsWrapper* source, 890 TabContentsWrapper* source,
889 const WebApplicationInfo& app_info) OVERRIDE; 891 const WebApplicationInfo& app_info) OVERRIDE;
890 892
891 // Note that the caller is responsible for deleting |old_tab_contents|. 893 // Note that the caller is responsible for deleting |old_tab_contents|.
892 virtual void SwapTabContents(TabContentsWrapper* old_tab_contents, 894 virtual void SwapTabContents(TabContentsWrapper* old_tab_contents,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 // this to return NULL if called before the toolbar has initialized. 1001 // this to return NULL if called before the toolbar has initialized.
1000 // TODO(beng): remove this. 1002 // TODO(beng): remove this.
1001 StatusBubble* GetStatusBubble(); 1003 StatusBubble* GetStatusBubble();
1002 1004
1003 // Session restore functions //////////////////////////////////////////////// 1005 // Session restore functions ////////////////////////////////////////////////
1004 1006
1005 // Notifies the history database of the index for all tabs whose index is 1007 // Notifies the history database of the index for all tabs whose index is
1006 // >= index. 1008 // >= index.
1007 void SyncHistoryWithTabs(int index); 1009 void SyncHistoryWithTabs(int index);
1008 1010
1011 // Tab fullscreen functions /////////////////////////////////////////////////
1012
1013 // There are two different kinds of fullscreen mode - "tab fullscreen" and
1014 // "browser fullscreen". "Tab fullscreen" refers to when a tab enters
1015 // fullscreen mode via the JS fullscreen API, and "browser fullscreen"
1016 // refers to the user putting the browser itself into fullscreen mode from
1017 // the UI. The difference is that tab fullscreen has implications for how
1018 // the contents of the tab render (eg: a video element may grow to consume
1019 // the whole tab), whereas browser fullscreen mode doesn't. Therefore if a
1020 // user forces an exit from fullscreen, we need to notify the tab so it can
1021 // stop rendering in its fullscreen mode.
1022
1023 // Make the current tab exit fullscreen mode if it is in it.
1024 void ExitTabbedFullscreenModeIfNecessary();
1025
1026 // Notifies the tab that it has been forced out of fullscreen mode if
1027 // necessary.
1028 void NotifyTabOfFullscreenExitIfNecessary();
1029
1009 // OnBeforeUnload handling ////////////////////////////////////////////////// 1030 // OnBeforeUnload handling //////////////////////////////////////////////////
1010 1031
1011 typedef std::set<TabContents*> UnloadListenerSet; 1032 typedef std::set<TabContents*> UnloadListenerSet;
1012 1033
1013 // Processes the next tab that needs it's beforeunload/unload event fired. 1034 // Processes the next tab that needs it's beforeunload/unload event fired.
1014 void ProcessPendingTabs(); 1035 void ProcessPendingTabs();
1015 1036
1016 // Whether we've completed firing all the tabs' beforeunload/unload events. 1037 // Whether we've completed firing all the tabs' beforeunload/unload events.
1017 bool HasCompletedUnloadProcessing() const; 1038 bool HasCompletedUnloadProcessing() const;
1018 1039
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 1140
1120 // Retrieves the content restrictions for the currently selected tab. 1141 // Retrieves the content restrictions for the currently selected tab.
1121 // Returns 0 if no tab selected, which is equivalent to no content 1142 // Returns 0 if no tab selected, which is equivalent to no content
1122 // restrictions active. 1143 // restrictions active.
1123 int GetContentRestrictionsForSelectedTab(); 1144 int GetContentRestrictionsForSelectedTab();
1124 1145
1125 // Resets |bookmark_bar_state_| based on the active tab. Notifies the 1146 // Resets |bookmark_bar_state_| based on the active tab. Notifies the
1126 // BrowserWindow if necessary. 1147 // BrowserWindow if necessary.
1127 void UpdateBookmarkBarState(BookmarkBarStateChangeReason reason); 1148 void UpdateBookmarkBarState(BookmarkBarStateChangeReason reason);
1128 1149
1150
1129 // Data members ///////////////////////////////////////////////////////////// 1151 // Data members /////////////////////////////////////////////////////////////
1130 1152
1131 NotificationRegistrar registrar_; 1153 NotificationRegistrar registrar_;
1132 1154
1133 PrefChangeRegistrar profile_pref_registrar_; 1155 PrefChangeRegistrar profile_pref_registrar_;
1134 1156
1135 PrefChangeRegistrar local_pref_registrar_; 1157 PrefChangeRegistrar local_pref_registrar_;
1136 1158
1137 // This Browser's type. 1159 // This Browser's type.
1138 const Type type_; 1160 const Type type_;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 TabRestoreService* tab_restore_service_; 1280 TabRestoreService* tab_restore_service_;
1259 1281
1260 // Helper which implements the TabRestoreServiceDelegate interface. 1282 // Helper which implements the TabRestoreServiceDelegate interface.
1261 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_; 1283 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_;
1262 1284
1263 scoped_ptr<InstantController> instant_; 1285 scoped_ptr<InstantController> instant_;
1264 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; 1286 scoped_ptr<InstantUnloadHandler> instant_unload_handler_;
1265 1287
1266 BookmarkBar::State bookmark_bar_state_; 1288 BookmarkBar::State bookmark_bar_state_;
1267 1289
1290 // Tab to notify when the browser exits fullscreen mode.
1291 TabContentsWrapper* fullscreened_tab_;
1292
1293 // True if the current tab is in fullscreen mode.
1294 bool tab_caused_fullscreen_;
1295
1268 DISALLOW_COPY_AND_ASSIGN(Browser); 1296 DISALLOW_COPY_AND_ASSIGN(Browser);
1269 }; 1297 };
1270 1298
1271 #endif // CHROME_BROWSER_UI_BROWSER_H_ 1299 #endif // CHROME_BROWSER_UI_BROWSER_H_
OLDNEW
« 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