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 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 198 bool is_being_dragged; |
| 199 #endif |
| 200 |
197 private: | 201 private: |
198 friend class Browser; | 202 friend class Browser; |
199 | 203 |
200 // The application name that is also the name of the window to the shell. | 204 // The application name that is also the name of the window to the shell. |
201 // Do not set this value directly, use CreateForApp. | 205 // Do not set this value directly, use CreateForApp. |
202 // This name will be set for: | 206 // This name will be set for: |
203 // 1) v1 applications launched via an application shortcut or extension API. | 207 // 1) v1 applications launched via an application shortcut or extension API. |
204 // 2) undocked devtool windows. | 208 // 2) undocked devtool windows. |
205 // 3) popup windows spawned from v1 applications. | 209 // 3) popup windows spawned from v1 applications. |
206 std::string app_name; | 210 std::string app_name; |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 bool CanDragEnter(content::WebContents* source, | 462 bool CanDragEnter(content::WebContents* source, |
459 const content::DropData& data, | 463 const content::DropData& data, |
460 blink::WebDragOperationsMask operations_allowed) override; | 464 blink::WebDragOperationsMask operations_allowed) override; |
461 content::SecurityStyle GetSecurityStyle( | 465 content::SecurityStyle GetSecurityStyle( |
462 content::WebContents* web_contents, | 466 content::WebContents* web_contents, |
463 content::SecurityStyleExplanations* security_style_explanations) override; | 467 content::SecurityStyleExplanations* security_style_explanations) override; |
464 | 468 |
465 bool is_type_tabbed() const { return type_ == TYPE_TABBED; } | 469 bool is_type_tabbed() const { return type_ == TYPE_TABBED; } |
466 bool is_type_popup() const { return type_ == TYPE_POPUP; } | 470 bool is_type_popup() const { return type_ == TYPE_POPUP; } |
467 | 471 |
| 472 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 473 bool is_being_dragged() const { return is_being_dragged_; } |
| 474 #endif |
| 475 |
468 bool is_app() const; | 476 bool is_app() const; |
469 bool is_devtools() const; | 477 bool is_devtools() const; |
470 | 478 |
471 // True when the mouse cursor is locked. | 479 // True when the mouse cursor is locked. |
472 bool IsMouseLocked() const; | 480 bool IsMouseLocked() const; |
473 | 481 |
474 // Called each time the browser window is shown. | 482 // Called each time the browser window is shown. |
475 void OnWindowDidShow(); | 483 void OnWindowDidShow(); |
476 | 484 |
477 // Show the first run search engine bubble on the location bar. | 485 // Show the first run search engine bubble on the location bar. |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 | 970 |
963 scoped_ptr<extensions::WindowController> extension_window_controller_; | 971 scoped_ptr<extensions::WindowController> extension_window_controller_; |
964 | 972 |
965 scoped_ptr<chrome::BrowserCommandController> command_controller_; | 973 scoped_ptr<chrome::BrowserCommandController> command_controller_; |
966 | 974 |
967 // True if the browser window has been shown at least once. | 975 // True if the browser window has been shown at least once. |
968 bool window_has_shown_; | 976 bool window_has_shown_; |
969 | 977 |
970 scoped_ptr<ValidationMessageBubble> validation_message_bubble_; | 978 scoped_ptr<ValidationMessageBubble> validation_message_bubble_; |
971 | 979 |
| 980 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 981 bool is_being_dragged_; |
| 982 #endif |
| 983 |
972 // The following factory is used for chrome update coalescing. | 984 // The following factory is used for chrome update coalescing. |
973 base::WeakPtrFactory<Browser> chrome_updater_factory_; | 985 base::WeakPtrFactory<Browser> chrome_updater_factory_; |
974 | 986 |
975 // The following factory is used to close the frame at a later time. | 987 // The following factory is used to close the frame at a later time. |
976 base::WeakPtrFactory<Browser> weak_factory_; | 988 base::WeakPtrFactory<Browser> weak_factory_; |
977 | 989 |
978 DISALLOW_COPY_AND_ASSIGN(Browser); | 990 DISALLOW_COPY_AND_ASSIGN(Browser); |
979 }; | 991 }; |
980 | 992 |
981 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 993 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |