| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/prefs/pref_change_registrar.h" | 18 #include "base/prefs/pref_change_registrar.h" |
| 19 #include "base/prefs/pref_member.h" | 19 #include "base/prefs/pref_member.h" |
| 20 #include "base/scoped_observer.h" | 20 #include "base/scoped_observer.h" |
| 21 #include "base/strings/string16.h" | 21 #include "base/strings/string16.h" |
| 22 #include "chrome/browser/devtools/devtools_toggle_action.h" | 22 #include "chrome/browser/devtools/devtools_toggle_action.h" |
| 23 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" | 23 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" |
| 24 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" | 24 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" |
| 25 #include "chrome/browser/ui/browser_navigator.h" | 25 #include "chrome/browser/ui/browser_navigator.h" |
| 26 #include "chrome/browser/ui/chrome_bubble_manager.h" |
| 26 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" | 27 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" |
| 27 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" | 28 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" |
| 28 #include "chrome/browser/ui/host_desktop.h" | 29 #include "chrome/browser/ui/host_desktop.h" |
| 29 #include "chrome/browser/ui/search/search_tab_helper_delegate.h" | 30 #include "chrome/browser/ui/search/search_tab_helper_delegate.h" |
| 30 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" | 31 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" |
| 31 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" | 32 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" |
| 32 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 33 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
| 33 #include "components/content_settings/core/common/content_settings.h" | 34 #include "components/content_settings/core/common/content_settings.h" |
| 34 #include "components/content_settings/core/common/content_settings_types.h" | 35 #include "components/content_settings/core/common/content_settings_types.h" |
| 35 #include "components/sessions/session_id.h" | 36 #include "components/sessions/session_id.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 // |window()| will return NULL if called before |CreateBrowserWindow()| | 248 // |window()| will return NULL if called before |CreateBrowserWindow()| |
| 248 // is done. | 249 // is done. |
| 249 BrowserWindow* window() const { return window_; } | 250 BrowserWindow* window() const { return window_; } |
| 250 ToolbarModel* toolbar_model() { return toolbar_model_.get(); } | 251 ToolbarModel* toolbar_model() { return toolbar_model_.get(); } |
| 251 const ToolbarModel* toolbar_model() const { return toolbar_model_.get(); } | 252 const ToolbarModel* toolbar_model() const { return toolbar_model_.get(); } |
| 252 #if defined(UNIT_TEST) | 253 #if defined(UNIT_TEST) |
| 253 void swap_toolbar_models(scoped_ptr<ToolbarModel>* toolbar_model) { | 254 void swap_toolbar_models(scoped_ptr<ToolbarModel>* toolbar_model) { |
| 254 toolbar_model->swap(toolbar_model_); | 255 toolbar_model->swap(toolbar_model_); |
| 255 } | 256 } |
| 256 #endif | 257 #endif |
| 258 ChromeBubbleManager* bubble_manager() { return &bubble_manager_; } |
| 257 TabStripModel* tab_strip_model() const { return tab_strip_model_.get(); } | 259 TabStripModel* tab_strip_model() const { return tab_strip_model_.get(); } |
| 258 chrome::BrowserCommandController* command_controller() { | 260 chrome::BrowserCommandController* command_controller() { |
| 259 return command_controller_.get(); | 261 return command_controller_.get(); |
| 260 } | 262 } |
| 261 SearchModel* search_model() { return search_model_.get(); } | 263 SearchModel* search_model() { return search_model_.get(); } |
| 262 const SearchModel* search_model() const { | 264 const SearchModel* search_model() const { |
| 263 return search_model_.get(); | 265 return search_model_.get(); |
| 264 } | 266 } |
| 265 SearchDelegate* search_delegate() { | 267 SearchDelegate* search_delegate() { |
| 266 return search_delegate_.get(); | 268 return search_delegate_.get(); |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 | 848 |
| 847 // This Browser's type. | 849 // This Browser's type. |
| 848 const Type type_; | 850 const Type type_; |
| 849 | 851 |
| 850 // This Browser's profile. | 852 // This Browser's profile. |
| 851 Profile* const profile_; | 853 Profile* const profile_; |
| 852 | 854 |
| 853 // This Browser's window. | 855 // This Browser's window. |
| 854 BrowserWindow* window_; | 856 BrowserWindow* window_; |
| 855 | 857 |
| 858 ChromeBubbleManager bubble_manager_; |
| 859 |
| 856 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_; | 860 scoped_ptr<TabStripModelDelegate> tab_strip_model_delegate_; |
| 857 scoped_ptr<TabStripModel> tab_strip_model_; | 861 scoped_ptr<TabStripModel> tab_strip_model_; |
| 858 | 862 |
| 859 // The application name that is also the name of the window to the shell. | 863 // The application name that is also the name of the window to the shell. |
| 860 // This name should be set when: | 864 // This name should be set when: |
| 861 // 1) we launch an application via an application shortcut or extension API. | 865 // 1) we launch an application via an application shortcut or extension API. |
| 862 // 2) we launch an undocked devtool window. | 866 // 2) we launch an undocked devtool window. |
| 863 std::string app_name_; | 867 std::string app_name_; |
| 864 | 868 |
| 865 // True if the source is trusted (i.e. we do not need to show the URL in a | 869 // True if the source is trusted (i.e. we do not need to show the URL in a |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 // The following factory is used for chrome update coalescing. | 976 // The following factory is used for chrome update coalescing. |
| 973 base::WeakPtrFactory<Browser> chrome_updater_factory_; | 977 base::WeakPtrFactory<Browser> chrome_updater_factory_; |
| 974 | 978 |
| 975 // The following factory is used to close the frame at a later time. | 979 // The following factory is used to close the frame at a later time. |
| 976 base::WeakPtrFactory<Browser> weak_factory_; | 980 base::WeakPtrFactory<Browser> weak_factory_; |
| 977 | 981 |
| 978 DISALLOW_COPY_AND_ASSIGN(Browser); | 982 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 979 }; | 983 }; |
| 980 | 984 |
| 981 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 985 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
| OLD | NEW |