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 16 matching lines...) Expand all Loading... |
27 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" | 27 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" |
28 #include "chrome/browser/ui/host_desktop.h" | 28 #include "chrome/browser/ui/host_desktop.h" |
29 #include "chrome/browser/ui/search/search_tab_helper_delegate.h" | 29 #include "chrome/browser/ui/search/search_tab_helper_delegate.h" |
30 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" | 30 #include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h" |
31 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" | 31 #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" |
32 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 32 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
33 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 33 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
34 #include "components/content_settings/core/common/content_settings.h" | 34 #include "components/content_settings/core/common/content_settings.h" |
35 #include "components/content_settings/core/common/content_settings_types.h" | 35 #include "components/content_settings/core/common/content_settings_types.h" |
36 #include "components/sessions/session_id.h" | 36 #include "components/sessions/session_id.h" |
| 37 #include "components/translate/content/browser/content_translate_driver.h" |
37 #include "components/ui/zoom/zoom_observer.h" | 38 #include "components/ui/zoom/zoom_observer.h" |
38 #include "content/public/browser/notification_observer.h" | 39 #include "content/public/browser/notification_observer.h" |
39 #include "content/public/browser/notification_registrar.h" | 40 #include "content/public/browser/notification_registrar.h" |
40 #include "content/public/browser/page_navigator.h" | 41 #include "content/public/browser/page_navigator.h" |
41 #include "content/public/browser/web_contents_delegate.h" | 42 #include "content/public/browser/web_contents_delegate.h" |
42 #include "content/public/common/page_zoom.h" | 43 #include "content/public/common/page_zoom.h" |
43 #include "ui/base/page_transition_types.h" | 44 #include "ui/base/page_transition_types.h" |
44 #include "ui/base/ui_base_types.h" | 45 #include "ui/base/ui_base_types.h" |
45 #include "ui/base/window_open_disposition.h" | 46 #include "ui/base/window_open_disposition.h" |
46 #include "ui/gfx/geometry/rect.h" | 47 #include "ui/gfx/geometry/rect.h" |
47 #include "ui/shell_dialogs/select_file_dialog.h" | 48 #include "ui/shell_dialogs/select_file_dialog.h" |
48 | 49 |
49 #if defined(ENABLE_EXTENSIONS) | 50 #if defined(ENABLE_EXTENSIONS) |
50 #include "extensions/browser/extension_registry_observer.h" | 51 #include "extensions/browser/extension_registry_observer.h" |
51 #endif | 52 #endif |
52 | 53 |
53 class BrowserContentSettingBubbleModelDelegate; | 54 class BrowserContentSettingBubbleModelDelegate; |
54 class BrowserContentTranslateDriverObserver; | |
55 class BrowserInstantController; | 55 class BrowserInstantController; |
56 class BrowserSyncedWindowDelegate; | 56 class BrowserSyncedWindowDelegate; |
57 class BrowserToolbarModelDelegate; | 57 class BrowserToolbarModelDelegate; |
58 class BrowserTabRestoreServiceDelegate; | 58 class BrowserTabRestoreServiceDelegate; |
59 class BrowserWindow; | 59 class BrowserWindow; |
60 class FindBarController; | 60 class FindBarController; |
61 class PrefService; | 61 class PrefService; |
62 class Profile; | 62 class Profile; |
63 class SearchDelegate; | 63 class SearchDelegate; |
64 class SearchModel; | 64 class SearchModel; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 public SearchEngineTabHelperDelegate, | 107 public SearchEngineTabHelperDelegate, |
108 public SearchTabHelperDelegate, | 108 public SearchTabHelperDelegate, |
109 public ChromeWebModalDialogManagerDelegate, | 109 public ChromeWebModalDialogManagerDelegate, |
110 public BookmarkTabHelperDelegate, | 110 public BookmarkTabHelperDelegate, |
111 public ui_zoom::ZoomObserver, | 111 public ui_zoom::ZoomObserver, |
112 public content::PageNavigator, | 112 public content::PageNavigator, |
113 public content::NotificationObserver, | 113 public content::NotificationObserver, |
114 #if defined(ENABLE_EXTENSIONS) | 114 #if defined(ENABLE_EXTENSIONS) |
115 public extensions::ExtensionRegistryObserver, | 115 public extensions::ExtensionRegistryObserver, |
116 #endif | 116 #endif |
| 117 public translate::ContentTranslateDriver::Observer, |
117 public ui::SelectFileDialog::Listener { | 118 public ui::SelectFileDialog::Listener { |
118 public: | 119 public: |
119 // SessionService::WindowType mirrors these values. If you add to this | 120 // SessionService::WindowType mirrors these values. If you add to this |
120 // enum, look at SessionService::WindowType to see if it needs to be | 121 // enum, look at SessionService::WindowType to see if it needs to be |
121 // updated. | 122 // updated. |
122 enum Type { | 123 enum Type { |
123 // If you add a new type, consider updating the test | 124 // If you add a new type, consider updating the test |
124 // BrowserTest.StartMaximized. | 125 // BrowserTest.StartMaximized. |
125 TYPE_TABBED = 1, | 126 TYPE_TABBED = 1, |
126 TYPE_POPUP = 2 | 127 TYPE_POPUP = 2 |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 const extensions::Extension* extension, | 708 const extensions::Extension* extension, |
708 extensions::UninstallReason reason) override; | 709 extensions::UninstallReason reason) override; |
709 void OnExtensionLoaded(content::BrowserContext* browser_context, | 710 void OnExtensionLoaded(content::BrowserContext* browser_context, |
710 const extensions::Extension* extension) override; | 711 const extensions::Extension* extension) override; |
711 void OnExtensionUnloaded( | 712 void OnExtensionUnloaded( |
712 content::BrowserContext* browser_context, | 713 content::BrowserContext* browser_context, |
713 const extensions::Extension* extension, | 714 const extensions::Extension* extension, |
714 extensions::UnloadedExtensionInfo::Reason reason) override; | 715 extensions::UnloadedExtensionInfo::Reason reason) override; |
715 #endif | 716 #endif |
716 | 717 |
| 718 // Overridden from translate::ContentTranslateDriver::Observer: |
| 719 void OnIsPageTranslatedChanged(content::WebContents* source) override; |
| 720 void OnTranslateEnabledChanged(content::WebContents* source) override; |
| 721 |
717 // Command and state updating /////////////////////////////////////////////// | 722 // Command and state updating /////////////////////////////////////////////// |
718 | 723 |
719 // Handle changes to kDevTools preference. | 724 // Handle changes to kDevTools preference. |
720 void OnDevToolsDisabledChanged(); | 725 void OnDevToolsDisabledChanged(); |
721 | 726 |
722 // UI update coalescing and handling //////////////////////////////////////// | 727 // UI update coalescing and handling //////////////////////////////////////// |
723 | 728 |
724 // Asks the toolbar (and as such the location bar) to update its state to | 729 // Asks the toolbar (and as such the location bar) to update its state to |
725 // reflect the current tab's current URL, security state, etc. | 730 // reflect the current tab's current URL, security state, etc. |
726 // If |should_restore_state| is true, we're switching (back?) to this tab and | 731 // If |should_restore_state| is true, we're switching (back?) to this tab and |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 | 960 |
956 scoped_ptr<ExclusiveAccessManager> exclusive_access_manager_; | 961 scoped_ptr<ExclusiveAccessManager> exclusive_access_manager_; |
957 | 962 |
958 scoped_ptr<extensions::WindowController> extension_window_controller_; | 963 scoped_ptr<extensions::WindowController> extension_window_controller_; |
959 | 964 |
960 scoped_ptr<chrome::BrowserCommandController> command_controller_; | 965 scoped_ptr<chrome::BrowserCommandController> command_controller_; |
961 | 966 |
962 // True if the browser window has been shown at least once. | 967 // True if the browser window has been shown at least once. |
963 bool window_has_shown_; | 968 bool window_has_shown_; |
964 | 969 |
965 scoped_ptr<BrowserContentTranslateDriverObserver> translate_driver_observer_; | |
966 | |
967 scoped_ptr<ValidationMessageBubble> validation_message_bubble_; | 970 scoped_ptr<ValidationMessageBubble> validation_message_bubble_; |
968 | 971 |
969 // The following factory is used for chrome update coalescing. | 972 // The following factory is used for chrome update coalescing. |
970 base::WeakPtrFactory<Browser> chrome_updater_factory_; | 973 base::WeakPtrFactory<Browser> chrome_updater_factory_; |
971 | 974 |
972 // The following factory is used to close the frame at a later time. | 975 // The following factory is used to close the frame at a later time. |
973 base::WeakPtrFactory<Browser> weak_factory_; | 976 base::WeakPtrFactory<Browser> weak_factory_; |
974 | 977 |
975 DISALLOW_COPY_AND_ASSIGN(Browser); | 978 DISALLOW_COPY_AND_ASSIGN(Browser); |
976 }; | 979 }; |
977 | 980 |
978 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 981 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |