OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
883 // Figure out if there are tabs that have beforeunload handlers. | 883 // Figure out if there are tabs that have beforeunload handlers. |
884 bool TabsNeedBeforeUnloadFired(); | 884 bool TabsNeedBeforeUnloadFired(); |
885 | 885 |
886 bool is_type_tabbed() const { return type_ == TYPE_TABBED; } | 886 bool is_type_tabbed() const { return type_ == TYPE_TABBED; } |
887 bool is_type_popup() const { return type_ == TYPE_POPUP; } | 887 bool is_type_popup() const { return type_ == TYPE_POPUP; } |
888 bool is_type_panel() const { return type_ == TYPE_PANEL; } | 888 bool is_type_panel() const { return type_ == TYPE_PANEL; } |
889 | 889 |
890 bool is_app() const; | 890 bool is_app() const; |
891 bool is_devtools() const; | 891 bool is_devtools() const; |
892 | 892 |
893 // True when the current tab is in fullscreen mode, requested by | 893 // True when the current tab is in fullscreen mode, requested by |
sky
2012/03/22 22:48:10
Update comments. To avoid duplicating what you hav
scheib
2012/03/26 23:30:46
Done.
| |
894 // webkitRequestFullScreen. | 894 // webkitRequestFullScreen. |
895 bool IsFullscreenForTab() const; | 895 bool IsFullscreenForTabOrPending() const; |
896 | |
897 // True when the mouse cursor is locked or pending lock. | |
898 bool IsMouseLockedOrPending() const; | |
896 | 899 |
897 // Called each time the browser window is shown. | 900 // Called each time the browser window is shown. |
898 void OnWindowDidShow(); | 901 void OnWindowDidShow(); |
899 | 902 |
900 // Show the first run search engine bubble on the location bar. | 903 // Show the first run search engine bubble on the location bar. |
901 void ShowFirstRunBubble(); | 904 void ShowFirstRunBubble(); |
902 | 905 |
903 ExtensionWindowController* extension_window_controller() const { | 906 ExtensionWindowController* extension_window_controller() const { |
904 return extension_window_controller_.get(); | 907 return extension_window_controller_.get(); |
905 } | 908 } |
906 | 909 |
907 protected: | 910 protected: |
908 // Wrapper for the factory method in BrowserWindow. This allows subclasses to | 911 // Wrapper for the factory method in BrowserWindow. This allows subclasses to |
909 // set their own window. | 912 // set their own window. |
910 virtual BrowserWindow* CreateBrowserWindow(); | 913 virtual BrowserWindow* CreateBrowserWindow(); |
911 | 914 |
912 private: | 915 private: |
916 friend class BrowserTest; | |
913 FRIEND_TEST_ALL_PREFIXES(AppModeTest, EnableAppModeTest); | 917 FRIEND_TEST_ALL_PREFIXES(AppModeTest, EnableAppModeTest); |
914 FRIEND_TEST_ALL_PREFIXES(BrowserTest, NoTabsInPopups); | 918 FRIEND_TEST_ALL_PREFIXES(BrowserTest, NoTabsInPopups); |
915 FRIEND_TEST_ALL_PREFIXES(BrowserTest, ConvertTabToAppShortcut); | 919 FRIEND_TEST_ALL_PREFIXES(BrowserTest, ConvertTabToAppShortcut); |
916 FRIEND_TEST_ALL_PREFIXES(BrowserTest, OpenAppWindowLikeNtp); | 920 FRIEND_TEST_ALL_PREFIXES(BrowserTest, OpenAppWindowLikeNtp); |
917 FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch); | 921 FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch); |
918 FRIEND_TEST_ALL_PREFIXES(BrowserTest, TestNewTabExitsFullscreen); | |
919 FRIEND_TEST_ALL_PREFIXES(BrowserTest, TestTabExitsItselfFromFullscreen); | |
920 FRIEND_TEST_ALL_PREFIXES(BrowserTest, TestFullscreenBubbleMouseLockState); | |
921 FRIEND_TEST_ALL_PREFIXES(BrowserTest, TabEntersPresentationModeFromWindowed); | 922 FRIEND_TEST_ALL_PREFIXES(BrowserTest, TabEntersPresentationModeFromWindowed); |
922 FRIEND_TEST_ALL_PREFIXES(FullscreenExitBubbleControllerTest, | 923 FRIEND_TEST_ALL_PREFIXES(FullscreenExitBubbleControllerTest, |
923 DenyExitsFullscreen); | 924 DenyExitsFullscreen); |
924 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutNoPref); | 925 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutNoPref); |
925 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutWindowPref); | 926 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutWindowPref); |
926 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutTabPref); | 927 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutTabPref); |
927 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutPanel); | 928 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutPanel); |
928 | 929 |
929 // Used to describe why a tab is being detached. This is used by | 930 // Used to describe why a tab is being detached. This is used by |
930 // TabDetachedAtImpl. | 931 // TabDetachedAtImpl. |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1032 virtual void DidNavigateToPendingEntry(content::WebContents* tab) OVERRIDE; | 1033 virtual void DidNavigateToPendingEntry(content::WebContents* tab) OVERRIDE; |
1033 virtual content::JavaScriptDialogCreator* | 1034 virtual content::JavaScriptDialogCreator* |
1034 GetJavaScriptDialogCreator() OVERRIDE; | 1035 GetJavaScriptDialogCreator() OVERRIDE; |
1035 virtual void RunFileChooser( | 1036 virtual void RunFileChooser( |
1036 content::WebContents* tab, | 1037 content::WebContents* tab, |
1037 const content::FileChooserParams& params) OVERRIDE; | 1038 const content::FileChooserParams& params) OVERRIDE; |
1038 virtual void EnumerateDirectory(content::WebContents* tab, int request_id, | 1039 virtual void EnumerateDirectory(content::WebContents* tab, int request_id, |
1039 const FilePath& path) OVERRIDE; | 1040 const FilePath& path) OVERRIDE; |
1040 virtual void ToggleFullscreenModeForTab(content::WebContents* tab, | 1041 virtual void ToggleFullscreenModeForTab(content::WebContents* tab, |
1041 bool enter_fullscreen) OVERRIDE; | 1042 bool enter_fullscreen) OVERRIDE; |
1042 virtual bool IsFullscreenForTab( | 1043 virtual bool IsFullscreenForTabOrPending( |
1043 const content::WebContents* tab) const OVERRIDE; | 1044 const content::WebContents* tab) const OVERRIDE; |
1044 virtual void JSOutOfMemory(content::WebContents* tab) OVERRIDE; | 1045 virtual void JSOutOfMemory(content::WebContents* tab) OVERRIDE; |
1045 virtual void RegisterProtocolHandler(content::WebContents* tab, | 1046 virtual void RegisterProtocolHandler(content::WebContents* tab, |
1046 const std::string& protocol, | 1047 const std::string& protocol, |
1047 const GURL& url, | 1048 const GURL& url, |
1048 const string16& title) OVERRIDE; | 1049 const string16& title) OVERRIDE; |
1049 virtual void RegisterIntentHandler(content::WebContents* tab, | 1050 virtual void RegisterIntentHandler(content::WebContents* tab, |
1050 const string16& action, | 1051 const string16& action, |
1051 const string16& type, | 1052 const string16& type, |
1052 const string16& href, | 1053 const string16& href, |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1487 | 1488 |
1488 scoped_ptr<ExtensionWindowController> extension_window_controller_; | 1489 scoped_ptr<ExtensionWindowController> extension_window_controller_; |
1489 | 1490 |
1490 // True if the browser window has been shown at least once. | 1491 // True if the browser window has been shown at least once. |
1491 bool window_has_shown_; | 1492 bool window_has_shown_; |
1492 | 1493 |
1493 DISALLOW_COPY_AND_ASSIGN(Browser); | 1494 DISALLOW_COPY_AND_ASSIGN(Browser); |
1494 }; | 1495 }; |
1495 | 1496 |
1496 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1497 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |