| 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 { |
| 247 return popup_manager_.get(); |
| 248 } |
| 245 TabStripModel* tab_strip_model() const { return tab_strip_model_.get(); } | 249 TabStripModel* tab_strip_model() const { return tab_strip_model_.get(); } |
| 246 chrome::BrowserCommandController* command_controller() { | 250 chrome::BrowserCommandController* command_controller() { |
| 247 return command_controller_.get(); | 251 return command_controller_.get(); |
| 248 } | 252 } |
| 249 SearchModel* search_model() { return search_model_.get(); } | 253 SearchModel* search_model() { return search_model_.get(); } |
| 250 const SearchModel* search_model() const { | 254 const SearchModel* search_model() const { |
| 251 return search_model_.get(); | 255 return search_model_.get(); |
| 252 } | 256 } |
| 253 SearchDelegate* search_delegate() { | 257 SearchDelegate* search_delegate() { |
| 254 return search_delegate_.get(); | 258 return search_delegate_.get(); |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 | 814 |
| 811 // This Browser's type. | 815 // This Browser's type. |
| 812 const Type type_; | 816 const Type type_; |
| 813 | 817 |
| 814 // This Browser's profile. | 818 // This Browser's profile. |
| 815 Profile* const profile_; | 819 Profile* const profile_; |
| 816 | 820 |
| 817 // This Browser's window. | 821 // This Browser's window. |
| 818 BrowserWindow* window_; | 822 BrowserWindow* window_; |
| 819 | 823 |
| 824 // Manages popup windows (bubbles, tab-modals) visible overlapping this |
| 825 // window. |
| 826 scoped_ptr<web_modal::PopupManager> popup_manager_; |
| 827 |
| 820 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_; | 828 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_; |
| 821 scoped_ptr<TabStripModel> tab_strip_model_; | 829 scoped_ptr<TabStripModel> tab_strip_model_; |
| 822 | 830 |
| 823 // The application name that is also the name of the window to the shell. | 831 // The application name that is also the name of the window to the shell. |
| 824 // This name should be set when: | 832 // This name should be set when: |
| 825 // 1) we launch an application via an application shortcut or extension API. | 833 // 1) we launch an application via an application shortcut or extension API. |
| 826 // 2) we launch an undocked devtool window. | 834 // 2) we launch an undocked devtool window. |
| 827 std::string app_name_; | 835 std::string app_name_; |
| 828 | 836 |
| 829 // True if the source is trusted (i.e. we do not need to show the URL in a | 837 // 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... |
| 935 base::WeakPtrFactory<Browser> weak_factory_; | 943 base::WeakPtrFactory<Browser> weak_factory_; |
| 936 | 944 |
| 937 scoped_ptr<BrowserContentTranslateDriverObserver> translate_driver_observer_; | 945 scoped_ptr<BrowserContentTranslateDriverObserver> translate_driver_observer_; |
| 938 | 946 |
| 939 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_; | 947 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_; |
| 940 | 948 |
| 941 DISALLOW_COPY_AND_ASSIGN(Browser); | 949 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 942 }; | 950 }; |
| 943 | 951 |
| 944 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 952 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
| OLD | NEW |