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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
84 class Image; | 84 class Image; |
85 class Point; | 85 class Point; |
86 } | 86 } |
87 | 87 |
88 namespace ui { | 88 namespace ui { |
89 struct SelectedFileInfo; | 89 struct SelectedFileInfo; |
90 class WebDialogDelegate; | 90 class WebDialogDelegate; |
91 } | 91 } |
92 | 92 |
93 namespace web_modal { | 93 namespace web_modal { |
94 class PopupManager; | |
94 class WebContentsModalDialogHost; | 95 class WebContentsModalDialogHost; |
95 } | 96 } |
96 | 97 |
97 class Browser : public TabStripModelObserver, | 98 class Browser : public TabStripModelObserver, |
98 public content::WebContentsDelegate, | 99 public content::WebContentsDelegate, |
99 public CoreTabHelperDelegate, | 100 public CoreTabHelperDelegate, |
100 public SearchEngineTabHelperDelegate, | 101 public SearchEngineTabHelperDelegate, |
101 public SearchTabHelperDelegate, | 102 public SearchTabHelperDelegate, |
102 public ChromeWebModalDialogManagerDelegate, | 103 public ChromeWebModalDialogManagerDelegate, |
103 public BookmarkTabHelperDelegate, | 104 public BookmarkTabHelperDelegate, |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
235 // |window()| will return NULL if called before |CreateBrowserWindow()| | 236 // |window()| will return NULL if called before |CreateBrowserWindow()| |
236 // is done. | 237 // is done. |
237 BrowserWindow* window() const { return window_; } | 238 BrowserWindow* window() const { return window_; } |
238 ToolbarModel* toolbar_model() { return toolbar_model_.get(); } | 239 ToolbarModel* toolbar_model() { return toolbar_model_.get(); } |
239 const ToolbarModel* toolbar_model() const { return toolbar_model_.get(); } | 240 const ToolbarModel* toolbar_model() const { return toolbar_model_.get(); } |
240 #if defined(UNIT_TEST) | 241 #if defined(UNIT_TEST) |
241 void swap_toolbar_models(scoped_ptr<ToolbarModel>* toolbar_model) { | 242 void swap_toolbar_models(scoped_ptr<ToolbarModel>* toolbar_model) { |
242 toolbar_model->swap(toolbar_model_); | 243 toolbar_model->swap(toolbar_model_); |
243 } | 244 } |
244 #endif | 245 #endif |
246 web_modal::PopupManager* popup_manager() const { return popup_manager_.get(); } | |
245 TabStripModel* tab_strip_model() const { return tab_strip_model_.get(); } | 247 TabStripModel* tab_strip_model() const { return tab_strip_model_.get(); } |
246 chrome::BrowserCommandController* command_controller() { | 248 chrome::BrowserCommandController* command_controller() { |
247 return command_controller_.get(); | 249 return command_controller_.get(); |
248 } | 250 } |
249 SearchModel* search_model() { return search_model_.get(); } | 251 SearchModel* search_model() { return search_model_.get(); } |
250 const SearchModel* search_model() const { | 252 const SearchModel* search_model() const { |
251 return search_model_.get(); | 253 return search_model_.get(); |
252 } | 254 } |
253 SearchDelegate* search_delegate() { | 255 SearchDelegate* search_delegate() { |
254 return search_delegate_.get(); | 256 return search_delegate_.get(); |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
811 | 813 |
812 // This Browser's type. | 814 // This Browser's type. |
813 const Type type_; | 815 const Type type_; |
814 | 816 |
815 // This Browser's profile. | 817 // This Browser's profile. |
816 Profile* const profile_; | 818 Profile* const profile_; |
817 | 819 |
818 // This Browser's window. | 820 // This Browser's window. |
819 BrowserWindow* window_; | 821 BrowserWindow* window_; |
820 | 822 |
823 // Manages popup windows (bubbles, tab-modals) visible overlapping this | |
824 // window. | |
825 scoped_ptr<web_modal::PopupManager> popup_manager_; | |
msw
2014/05/22 04:08:45
Why should this be a scoped_ptr rather than a non-
Greg Billock
2014/05/22 18:25:47
No particular reason right now -- in general scope
| |
826 | |
821 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_; | 827 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_; |
822 scoped_ptr<TabStripModel> tab_strip_model_; | 828 scoped_ptr<TabStripModel> tab_strip_model_; |
823 | 829 |
824 // The application name that is also the name of the window to the shell. | 830 // The application name that is also the name of the window to the shell. |
825 // This name should be set when: | 831 // This name should be set when: |
826 // 1) we launch an application via an application shortcut or extension API. | 832 // 1) we launch an application via an application shortcut or extension API. |
827 // 2) we launch an undocked devtool window. | 833 // 2) we launch an undocked devtool window. |
828 std::string app_name_; | 834 std::string app_name_; |
829 | 835 |
830 // True if the source is trusted (i.e. we do not need to show the URL in a | 836 // True if the source is trusted (i.e. we do not need to show the URL in a |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
936 base::WeakPtrFactory<Browser> weak_factory_; | 942 base::WeakPtrFactory<Browser> weak_factory_; |
937 | 943 |
938 scoped_ptr<BrowserContentTranslateDriverObserver> translate_driver_observer_; | 944 scoped_ptr<BrowserContentTranslateDriverObserver> translate_driver_observer_; |
939 | 945 |
940 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_; | 946 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_; |
941 | 947 |
942 DISALLOW_COPY_AND_ASSIGN(Browser); | 948 DISALLOW_COPY_AND_ASSIGN(Browser); |
943 }; | 949 }; |
944 | 950 |
945 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 951 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |