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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 // Figure out if there are tabs that have beforeunload handlers. | 902 // Figure out if there are tabs that have beforeunload handlers. |
903 bool TabsNeedBeforeUnloadFired(); | 903 bool TabsNeedBeforeUnloadFired(); |
904 | 904 |
905 bool is_type_tabbed() const { return type_ == TYPE_TABBED; } | 905 bool is_type_tabbed() const { return type_ == TYPE_TABBED; } |
906 bool is_type_popup() const { return type_ == TYPE_POPUP; } | 906 bool is_type_popup() const { return type_ == TYPE_POPUP; } |
907 bool is_type_panel() const { return type_ == TYPE_PANEL; } | 907 bool is_type_panel() const { return type_ == TYPE_PANEL; } |
908 | 908 |
909 bool is_app() const; | 909 bool is_app() const; |
910 bool is_devtools() const; | 910 bool is_devtools() const; |
911 | 911 |
912 // See FullscreenController::IsFullscreenForTabOrPending. | 912 // True when the current tab is in fullscreen mode, requested by |
913 bool IsFullscreenForTabOrPending() const; | 913 // webkitRequestFullScreen. |
914 | 914 bool IsFullscreenForTab() const; |
915 // True when the mouse cursor is locked or pending lock. | |
916 bool IsMouseLockedOrPending() const; | |
917 | 915 |
918 // Called each time the browser window is shown. | 916 // Called each time the browser window is shown. |
919 void OnWindowDidShow(); | 917 void OnWindowDidShow(); |
920 | 918 |
921 // Show the first run search engine bubble on the location bar. | 919 // Show the first run search engine bubble on the location bar. |
922 void ShowFirstRunBubble(); | 920 void ShowFirstRunBubble(); |
923 | 921 |
924 ExtensionWindowController* extension_window_controller() const { | 922 ExtensionWindowController* extension_window_controller() const { |
925 return extension_window_controller_.get(); | 923 return extension_window_controller_.get(); |
926 } | 924 } |
927 | 925 |
928 protected: | 926 protected: |
929 // Wrapper for the factory method in BrowserWindow. This allows subclasses to | 927 // Wrapper for the factory method in BrowserWindow. This allows subclasses to |
930 // set their own window. | 928 // set their own window. |
931 virtual BrowserWindow* CreateBrowserWindow(); | 929 virtual BrowserWindow* CreateBrowserWindow(); |
932 | 930 |
933 private: | 931 private: |
934 friend class BrowserTest; | |
935 FRIEND_TEST_ALL_PREFIXES(AppModeTest, EnableAppModeTest); | 932 FRIEND_TEST_ALL_PREFIXES(AppModeTest, EnableAppModeTest); |
936 FRIEND_TEST_ALL_PREFIXES(BrowserTest, NoTabsInPopups); | 933 FRIEND_TEST_ALL_PREFIXES(BrowserTest, NoTabsInPopups); |
937 FRIEND_TEST_ALL_PREFIXES(BrowserTest, ConvertTabToAppShortcut); | 934 FRIEND_TEST_ALL_PREFIXES(BrowserTest, ConvertTabToAppShortcut); |
938 FRIEND_TEST_ALL_PREFIXES(BrowserTest, OpenAppWindowLikeNtp); | 935 FRIEND_TEST_ALL_PREFIXES(BrowserTest, OpenAppWindowLikeNtp); |
939 FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch); | 936 FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch); |
| 937 FRIEND_TEST_ALL_PREFIXES(BrowserTest, TestNewTabExitsFullscreen); |
| 938 FRIEND_TEST_ALL_PREFIXES(BrowserTest, TestTabExitsItselfFromFullscreen); |
| 939 FRIEND_TEST_ALL_PREFIXES(BrowserTest, TestFullscreenBubbleMouseLockState); |
940 FRIEND_TEST_ALL_PREFIXES(BrowserTest, TabEntersPresentationModeFromWindowed); | 940 FRIEND_TEST_ALL_PREFIXES(BrowserTest, TabEntersPresentationModeFromWindowed); |
941 FRIEND_TEST_ALL_PREFIXES(FullscreenExitBubbleControllerTest, | 941 FRIEND_TEST_ALL_PREFIXES(FullscreenExitBubbleControllerTest, |
942 DenyExitsFullscreen); | 942 DenyExitsFullscreen); |
943 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutNoPref); | 943 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutNoPref); |
944 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutWindowPref); | 944 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutWindowPref); |
945 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutTabPref); | 945 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutTabPref); |
946 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutPanel); | 946 FRIEND_TEST_ALL_PREFIXES(BrowserInitTest, OpenAppShortcutPanel); |
947 | 947 |
948 // Used to describe why a tab is being detached. This is used by | 948 // Used to describe why a tab is being detached. This is used by |
949 // TabDetachedAtImpl. | 949 // TabDetachedAtImpl. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 int color_chooser_id, | 1056 int color_chooser_id, |
1057 const SkColor& color) OVERRIDE; | 1057 const SkColor& color) OVERRIDE; |
1058 virtual void DidEndColorChooser() OVERRIDE; | 1058 virtual void DidEndColorChooser() OVERRIDE; |
1059 virtual void RunFileChooser( | 1059 virtual void RunFileChooser( |
1060 content::WebContents* tab, | 1060 content::WebContents* tab, |
1061 const content::FileChooserParams& params) OVERRIDE; | 1061 const content::FileChooserParams& params) OVERRIDE; |
1062 virtual void EnumerateDirectory(content::WebContents* tab, int request_id, | 1062 virtual void EnumerateDirectory(content::WebContents* tab, int request_id, |
1063 const FilePath& path) OVERRIDE; | 1063 const FilePath& path) OVERRIDE; |
1064 virtual void ToggleFullscreenModeForTab(content::WebContents* tab, | 1064 virtual void ToggleFullscreenModeForTab(content::WebContents* tab, |
1065 bool enter_fullscreen) OVERRIDE; | 1065 bool enter_fullscreen) OVERRIDE; |
1066 virtual bool IsFullscreenForTabOrPending( | 1066 virtual bool IsFullscreenForTab( |
1067 const content::WebContents* tab) const OVERRIDE; | 1067 const content::WebContents* tab) const OVERRIDE; |
1068 virtual void JSOutOfMemory(content::WebContents* tab) OVERRIDE; | 1068 virtual void JSOutOfMemory(content::WebContents* tab) OVERRIDE; |
1069 virtual void RegisterProtocolHandler(content::WebContents* tab, | 1069 virtual void RegisterProtocolHandler(content::WebContents* tab, |
1070 const std::string& protocol, | 1070 const std::string& protocol, |
1071 const GURL& url, | 1071 const GURL& url, |
1072 const string16& title) OVERRIDE; | 1072 const string16& title) OVERRIDE; |
1073 virtual void RegisterIntentHandler(content::WebContents* tab, | 1073 virtual void RegisterIntentHandler(content::WebContents* tab, |
1074 const string16& action, | 1074 const string16& action, |
1075 const string16& type, | 1075 const string16& type, |
1076 const string16& href, | 1076 const string16& href, |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 bool window_has_shown_; | 1518 bool window_has_shown_; |
1519 | 1519 |
1520 // Currently open color chooser. Non-NULL after OpenColorChooser is called and | 1520 // Currently open color chooser. Non-NULL after OpenColorChooser is called and |
1521 // before DidEndColorChooser is called. | 1521 // before DidEndColorChooser is called. |
1522 scoped_ptr<content::ColorChooser> color_chooser_; | 1522 scoped_ptr<content::ColorChooser> color_chooser_; |
1523 | 1523 |
1524 DISALLOW_COPY_AND_ASSIGN(Browser); | 1524 DISALLOW_COPY_AND_ASSIGN(Browser); |
1525 }; | 1525 }; |
1526 | 1526 |
1527 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1527 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |