Chromium Code Reviews| 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 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 gfx::Rect initial_bounds; | 187 gfx::Rect initial_bounds; |
| 188 | 188 |
| 189 ui::WindowShowState initial_show_state; | 189 ui::WindowShowState initial_show_state; |
| 190 | 190 |
| 191 bool is_session_restore; | 191 bool is_session_restore; |
| 192 | 192 |
| 193 // Supply a custom BrowserWindow implementation, to be used instead of the | 193 // Supply a custom BrowserWindow implementation, to be used instead of the |
| 194 // default. Intended for testing. | 194 // default. Intended for testing. |
| 195 BrowserWindow* window; | 195 BrowserWindow* window; |
| 196 | 196 |
| 197 bool override_redirect; | |
|
Daniel Erat
2015/11/18 16:16:47
this should be desktop-linux-only. i _think_ that
Elliot Glaysher
2015/11/18 18:20:21
It's:
#if defined(OS_LINUX) && !defined(OS_CHROME
stapelberg
2015/12/23 13:17:24
Done.
| |
| 198 | |
| 197 private: | 199 private: |
| 198 friend class Browser; | 200 friend class Browser; |
| 199 | 201 |
| 200 // The application name that is also the name of the window to the shell. | 202 // The application name that is also the name of the window to the shell. |
| 201 // Do not set this value directly, use CreateForApp. | 203 // Do not set this value directly, use CreateForApp. |
| 202 // This name will be set for: | 204 // This name will be set for: |
| 203 // 1) v1 applications launched via an application shortcut or extension API. | 205 // 1) v1 applications launched via an application shortcut or extension API. |
| 204 // 2) undocked devtool windows. | 206 // 2) undocked devtool windows. |
| 205 // 3) popup windows spawned from v1 applications. | 207 // 3) popup windows spawned from v1 applications. |
| 206 std::string app_name; | 208 std::string app_name; |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 458 bool CanDragEnter(content::WebContents* source, | 460 bool CanDragEnter(content::WebContents* source, |
| 459 const content::DropData& data, | 461 const content::DropData& data, |
| 460 blink::WebDragOperationsMask operations_allowed) override; | 462 blink::WebDragOperationsMask operations_allowed) override; |
| 461 content::SecurityStyle GetSecurityStyle( | 463 content::SecurityStyle GetSecurityStyle( |
| 462 content::WebContents* web_contents, | 464 content::WebContents* web_contents, |
| 463 content::SecurityStyleExplanations* security_style_explanations) override; | 465 content::SecurityStyleExplanations* security_style_explanations) override; |
| 464 | 466 |
| 465 bool is_type_tabbed() const { return type_ == TYPE_TABBED; } | 467 bool is_type_tabbed() const { return type_ == TYPE_TABBED; } |
| 466 bool is_type_popup() const { return type_ == TYPE_POPUP; } | 468 bool is_type_popup() const { return type_ == TYPE_POPUP; } |
| 467 | 469 |
| 470 bool is_override_redirect() const { return override_redirect_; } | |
| 471 | |
| 468 bool is_app() const; | 472 bool is_app() const; |
| 469 bool is_devtools() const; | 473 bool is_devtools() const; |
| 470 | 474 |
| 471 // True when the mouse cursor is locked. | 475 // True when the mouse cursor is locked. |
| 472 bool IsMouseLocked() const; | 476 bool IsMouseLocked() const; |
| 473 | 477 |
| 474 // Called each time the browser window is shown. | 478 // Called each time the browser window is shown. |
| 475 void OnWindowDidShow(); | 479 void OnWindowDidShow(); |
| 476 | 480 |
| 477 // Show the first run search engine bubble on the location bar. | 481 // Show the first run search engine bubble on the location bar. |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 840 ScopedObserver<extensions::ExtensionRegistry, | 844 ScopedObserver<extensions::ExtensionRegistry, |
| 841 extensions::ExtensionRegistryObserver> | 845 extensions::ExtensionRegistryObserver> |
| 842 extension_registry_observer_; | 846 extension_registry_observer_; |
| 843 #endif | 847 #endif |
| 844 | 848 |
| 845 PrefChangeRegistrar profile_pref_registrar_; | 849 PrefChangeRegistrar profile_pref_registrar_; |
| 846 | 850 |
| 847 // This Browser's type. | 851 // This Browser's type. |
| 848 const Type type_; | 852 const Type type_; |
| 849 | 853 |
| 854 | |
| 850 // This Browser's profile. | 855 // This Browser's profile. |
| 851 Profile* const profile_; | 856 Profile* const profile_; |
| 852 | 857 |
| 853 // This Browser's window. | 858 // This Browser's window. |
| 854 BrowserWindow* window_; | 859 BrowserWindow* window_; |
| 855 | 860 |
| 856 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_; | 861 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_; |
| 857 scoped_ptr<TabStripModel> tab_strip_model_; | 862 scoped_ptr<TabStripModel> tab_strip_model_; |
| 858 | 863 |
| 859 // The application name that is also the name of the window to the shell. | 864 // The application name that is also the name of the window to the shell. |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 962 | 967 |
| 963 scoped_ptr<extensions::WindowController> extension_window_controller_; | 968 scoped_ptr<extensions::WindowController> extension_window_controller_; |
| 964 | 969 |
| 965 scoped_ptr<chrome::BrowserCommandController> command_controller_; | 970 scoped_ptr<chrome::BrowserCommandController> command_controller_; |
| 966 | 971 |
| 967 // True if the browser window has been shown at least once. | 972 // True if the browser window has been shown at least once. |
| 968 bool window_has_shown_; | 973 bool window_has_shown_; |
| 969 | 974 |
| 970 scoped_ptr<ValidationMessageBubble> validation_message_bubble_; | 975 scoped_ptr<ValidationMessageBubble> validation_message_bubble_; |
| 971 | 976 |
| 977 bool override_redirect_; | |
| 978 | |
| 972 // The following factory is used for chrome update coalescing. | 979 // The following factory is used for chrome update coalescing. |
| 973 base::WeakPtrFactory<Browser> chrome_updater_factory_; | 980 base::WeakPtrFactory<Browser> chrome_updater_factory_; |
| 974 | 981 |
| 975 // The following factory is used to close the frame at a later time. | 982 // The following factory is used to close the frame at a later time. |
| 976 base::WeakPtrFactory<Browser> weak_factory_; | 983 base::WeakPtrFactory<Browser> weak_factory_; |
| 977 | 984 |
| 978 DISALLOW_COPY_AND_ASSIGN(Browser); | 985 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 979 }; | 986 }; |
| 980 | 987 |
| 981 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 988 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
| OLD | NEW |