| 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; | |
| 95 class WebContentsModalDialogHost; | 94 class WebContentsModalDialogHost; |
| 96 } | 95 } |
| 97 | 96 |
| 98 class Browser : public TabStripModelObserver, | 97 class Browser : public TabStripModelObserver, |
| 99 public content::WebContentsDelegate, | 98 public content::WebContentsDelegate, |
| 100 public CoreTabHelperDelegate, | 99 public CoreTabHelperDelegate, |
| 101 public SearchEngineTabHelperDelegate, | 100 public SearchEngineTabHelperDelegate, |
| 102 public SearchTabHelperDelegate, | 101 public SearchTabHelperDelegate, |
| 103 public ChromeWebModalDialogManagerDelegate, | 102 public ChromeWebModalDialogManagerDelegate, |
| 104 public BookmarkTabHelperDelegate, | 103 public BookmarkTabHelperDelegate, |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 // |window()| will return NULL if called before |CreateBrowserWindow()| | 235 // |window()| will return NULL if called before |CreateBrowserWindow()| |
| 237 // is done. | 236 // is done. |
| 238 BrowserWindow* window() const { return window_; } | 237 BrowserWindow* window() const { return window_; } |
| 239 ToolbarModel* toolbar_model() { return toolbar_model_.get(); } | 238 ToolbarModel* toolbar_model() { return toolbar_model_.get(); } |
| 240 const ToolbarModel* toolbar_model() const { return toolbar_model_.get(); } | 239 const ToolbarModel* toolbar_model() const { return toolbar_model_.get(); } |
| 241 #if defined(UNIT_TEST) | 240 #if defined(UNIT_TEST) |
| 242 void swap_toolbar_models(scoped_ptr<ToolbarModel>* toolbar_model) { | 241 void swap_toolbar_models(scoped_ptr<ToolbarModel>* toolbar_model) { |
| 243 toolbar_model->swap(toolbar_model_); | 242 toolbar_model->swap(toolbar_model_); |
| 244 } | 243 } |
| 245 #endif | 244 #endif |
| 246 web_modal::PopupManager* popup_manager() { | |
| 247 return popup_manager_.get(); | |
| 248 } | |
| 249 TabStripModel* tab_strip_model() const { return tab_strip_model_.get(); } | 245 TabStripModel* tab_strip_model() const { return tab_strip_model_.get(); } |
| 250 chrome::BrowserCommandController* command_controller() { | 246 chrome::BrowserCommandController* command_controller() { |
| 251 return command_controller_.get(); | 247 return command_controller_.get(); |
| 252 } | 248 } |
| 253 SearchModel* search_model() { return search_model_.get(); } | 249 SearchModel* search_model() { return search_model_.get(); } |
| 254 const SearchModel* search_model() const { | 250 const SearchModel* search_model() const { |
| 255 return search_model_.get(); | 251 return search_model_.get(); |
| 256 } | 252 } |
| 257 SearchDelegate* search_delegate() { | 253 SearchDelegate* search_delegate() { |
| 258 return search_delegate_.get(); | 254 return search_delegate_.get(); |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 | 821 |
| 826 // This Browser's type. | 822 // This Browser's type. |
| 827 const Type type_; | 823 const Type type_; |
| 828 | 824 |
| 829 // This Browser's profile. | 825 // This Browser's profile. |
| 830 Profile* const profile_; | 826 Profile* const profile_; |
| 831 | 827 |
| 832 // This Browser's window. | 828 // This Browser's window. |
| 833 BrowserWindow* window_; | 829 BrowserWindow* window_; |
| 834 | 830 |
| 835 // Manages popup windows (bubbles, tab-modals) visible overlapping this | |
| 836 // window. JS alerts are not handled by this manager. | |
| 837 scoped_ptr<web_modal::PopupManager> popup_manager_; | |
| 838 | |
| 839 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_; | 831 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_; |
| 840 scoped_ptr<TabStripModel> tab_strip_model_; | 832 scoped_ptr<TabStripModel> tab_strip_model_; |
| 841 | 833 |
| 842 // The application name that is also the name of the window to the shell. | 834 // The application name that is also the name of the window to the shell. |
| 843 // This name should be set when: | 835 // This name should be set when: |
| 844 // 1) we launch an application via an application shortcut or extension API. | 836 // 1) we launch an application via an application shortcut or extension API. |
| 845 // 2) we launch an undocked devtool window. | 837 // 2) we launch an undocked devtool window. |
| 846 std::string app_name_; | 838 std::string app_name_; |
| 847 | 839 |
| 848 // True if the source is trusted (i.e. we do not need to show the URL in a | 840 // 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... |
| 954 base::WeakPtrFactory<Browser> weak_factory_; | 946 base::WeakPtrFactory<Browser> weak_factory_; |
| 955 | 947 |
| 956 scoped_ptr<BrowserContentTranslateDriverObserver> translate_driver_observer_; | 948 scoped_ptr<BrowserContentTranslateDriverObserver> translate_driver_observer_; |
| 957 | 949 |
| 958 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_; | 950 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_; |
| 959 | 951 |
| 960 DISALLOW_COPY_AND_ASSIGN(Browser); | 952 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 961 }; | 953 }; |
| 962 | 954 |
| 963 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 955 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
| OLD | NEW |