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/public/pref_change_registrar.h" | 18 #include "base/prefs/public/pref_change_registrar.h" |
| 19 #include "base/prefs/public/pref_observer.h" |
19 #include "base/string16.h" | 20 #include "base/string16.h" |
20 #include "chrome/browser/api/prefs/pref_member.h" | 21 #include "chrome/browser/api/prefs/pref_member.h" |
21 #include "chrome/browser/debugger/devtools_toggle_action.h" | 22 #include "chrome/browser/debugger/devtools_toggle_action.h" |
22 #include "chrome/browser/event_disposition.h" | 23 #include "chrome/browser/event_disposition.h" |
23 #include "chrome/browser/sessions/session_id.h" | 24 #include "chrome/browser/sessions/session_id.h" |
24 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.
h" | 25 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.
h" |
25 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" | 26 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" |
26 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" | 27 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h" |
27 #include "chrome/browser/ui/browser_navigator.h" | 28 #include "chrome/browser/ui/browser_navigator.h" |
28 #include "chrome/browser/ui/constrained_window_tab_helper_delegate.h" | 29 #include "chrome/browser/ui/constrained_window_tab_helper_delegate.h" |
29 #include "chrome/browser/ui/host_desktop.h" | 30 #include "chrome/browser/ui/host_desktop.h" |
30 #include "chrome/browser/ui/search/search_model_observer.h" | 31 #include "chrome/browser/ui/search/search_model_observer.h" |
31 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" | 32 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" |
32 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" | 33 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" |
33 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 34 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
34 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 35 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
35 #include "chrome/browser/ui/zoom/zoom_observer.h" | 36 #include "chrome/browser/ui/zoom/zoom_observer.h" |
36 #include "chrome/common/content_settings.h" | 37 #include "chrome/common/content_settings.h" |
37 #include "chrome/common/content_settings_types.h" | 38 #include "chrome/common/content_settings_types.h" |
38 #include "chrome/common/extensions/extension_constants.h" | 39 #include "chrome/common/extensions/extension_constants.h" |
| 40 #include "content/public/browser/notification_observer.h" |
39 #include "content/public/browser/notification_registrar.h" | 41 #include "content/public/browser/notification_registrar.h" |
40 #include "content/public/browser/page_navigator.h" | 42 #include "content/public/browser/page_navigator.h" |
41 #include "content/public/browser/web_contents_delegate.h" | 43 #include "content/public/browser/web_contents_delegate.h" |
42 #include "content/public/common/page_transition_types.h" | 44 #include "content/public/common/page_transition_types.h" |
43 #include "content/public/common/page_zoom.h" | 45 #include "content/public/common/page_zoom.h" |
44 #include "ui/base/dialogs/select_file_dialog.h" | 46 #include "ui/base/dialogs/select_file_dialog.h" |
45 #include "ui/base/ui_base_types.h" | 47 #include "ui/base/ui_base_types.h" |
46 #include "ui/gfx/rect.h" | 48 #include "ui/gfx/rect.h" |
47 | 49 |
48 class BrowserContentSettingBubbleModelDelegate; | 50 class BrowserContentSettingBubbleModelDelegate; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 class Browser : public TabStripModelObserver, | 101 class Browser : public TabStripModelObserver, |
100 public content::WebContentsDelegate, | 102 public content::WebContentsDelegate, |
101 public CoreTabHelperDelegate, | 103 public CoreTabHelperDelegate, |
102 public SearchEngineTabHelperDelegate, | 104 public SearchEngineTabHelperDelegate, |
103 public ConstrainedWindowTabHelperDelegate, | 105 public ConstrainedWindowTabHelperDelegate, |
104 public BlockedContentTabHelperDelegate, | 106 public BlockedContentTabHelperDelegate, |
105 public BookmarkTabHelperDelegate, | 107 public BookmarkTabHelperDelegate, |
106 public ZoomObserver, | 108 public ZoomObserver, |
107 public content::PageNavigator, | 109 public content::PageNavigator, |
108 public content::NotificationObserver, | 110 public content::NotificationObserver, |
| 111 public PrefObserver, |
109 public ui::SelectFileDialog::Listener, | 112 public ui::SelectFileDialog::Listener, |
110 public chrome::search::SearchModelObserver { | 113 public chrome::search::SearchModelObserver { |
111 public: | 114 public: |
112 // SessionService::WindowType mirrors these values. If you add to this | 115 // SessionService::WindowType mirrors these values. If you add to this |
113 // enum, look at SessionService::WindowType to see if it needs to be | 116 // enum, look at SessionService::WindowType to see if it needs to be |
114 // updated. | 117 // updated. |
115 enum Type { | 118 enum Type { |
116 // If you add a new type, consider updating the test | 119 // If you add a new type, consider updating the test |
117 // BrowserTest.StartMaximized. | 120 // BrowserTest.StartMaximized. |
118 TYPE_TABBED = 1, | 121 TYPE_TABBED = 1, |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 virtual void FileSelectedWithExtraInfo( | 687 virtual void FileSelectedWithExtraInfo( |
685 const ui::SelectedFileInfo& file_info, | 688 const ui::SelectedFileInfo& file_info, |
686 int index, | 689 int index, |
687 void* params) OVERRIDE; | 690 void* params) OVERRIDE; |
688 | 691 |
689 // Overridden from content::NotificationObserver: | 692 // Overridden from content::NotificationObserver: |
690 virtual void Observe(int type, | 693 virtual void Observe(int type, |
691 const content::NotificationSource& source, | 694 const content::NotificationSource& source, |
692 const content::NotificationDetails& details) OVERRIDE; | 695 const content::NotificationDetails& details) OVERRIDE; |
693 | 696 |
| 697 // Overridden from PrefObserver: |
| 698 virtual void OnPreferenceChanged(PrefServiceBase* service, |
| 699 const std::string& pref_name) OVERRIDE; |
| 700 |
694 // Overridden from chrome::search::SearchModelObserver: | 701 // Overridden from chrome::search::SearchModelObserver: |
695 virtual void ModeChanged(const chrome::search::Mode& old_mode, | 702 virtual void ModeChanged(const chrome::search::Mode& old_mode, |
696 const chrome::search::Mode& new_mode) OVERRIDE; | 703 const chrome::search::Mode& new_mode) OVERRIDE; |
697 | 704 |
698 // Command and state updating /////////////////////////////////////////////// | 705 // Command and state updating /////////////////////////////////////////////// |
699 | 706 |
700 // Set the preference that indicates that the home page has been changed. | 707 // Set the preference that indicates that the home page has been changed. |
701 void MarkHomePageAsChanged(PrefService* pref_service); | 708 void MarkHomePageAsChanged(PrefService* pref_service); |
702 | 709 |
703 // UI update coalescing and handling //////////////////////////////////////// | 710 // UI update coalescing and handling //////////////////////////////////////// |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 bool window_has_shown_; | 948 bool window_has_shown_; |
942 | 949 |
943 // Currently open color chooser. Non-NULL after OpenColorChooser is called and | 950 // Currently open color chooser. Non-NULL after OpenColorChooser is called and |
944 // before DidEndColorChooser is called. | 951 // before DidEndColorChooser is called. |
945 scoped_ptr<content::ColorChooser> color_chooser_; | 952 scoped_ptr<content::ColorChooser> color_chooser_; |
946 | 953 |
947 DISALLOW_COPY_AND_ASSIGN(Browser); | 954 DISALLOW_COPY_AND_ASSIGN(Browser); |
948 }; | 955 }; |
949 | 956 |
950 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 957 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |