| 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 21 matching lines...) Expand all Loading... |
| 32 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 32 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
| 33 #include "chrome/browser/ui/zoom/zoom_observer.h" | 33 #include "chrome/browser/ui/zoom/zoom_observer.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 "content/public/browser/notification_observer.h" | 37 #include "content/public/browser/notification_observer.h" |
| 38 #include "content/public/browser/notification_registrar.h" | 38 #include "content/public/browser/notification_registrar.h" |
| 39 #include "content/public/browser/page_navigator.h" | 39 #include "content/public/browser/page_navigator.h" |
| 40 #include "content/public/browser/web_contents_delegate.h" | 40 #include "content/public/browser/web_contents_delegate.h" |
| 41 #include "content/public/common/page_zoom.h" | 41 #include "content/public/common/page_zoom.h" |
| 42 #include "extensions/browser/extension_registry_observer.h" | |
| 43 #include "ui/base/page_transition_types.h" | 42 #include "ui/base/page_transition_types.h" |
| 44 #include "ui/base/ui_base_types.h" | 43 #include "ui/base/ui_base_types.h" |
| 45 #include "ui/base/window_open_disposition.h" | 44 #include "ui/base/window_open_disposition.h" |
| 46 #include "ui/gfx/rect.h" | 45 #include "ui/gfx/rect.h" |
| 47 #include "ui/shell_dialogs/select_file_dialog.h" | 46 #include "ui/shell_dialogs/select_file_dialog.h" |
| 48 | 47 |
| 48 #if defined(ENABLE_EXTENSIONS) |
| 49 #include "extensions/browser/extension_registry_observer.h" |
| 50 #endif |
| 51 |
| 49 class BrowserContentSettingBubbleModelDelegate; | 52 class BrowserContentSettingBubbleModelDelegate; |
| 50 class BrowserContentTranslateDriverObserver; | 53 class BrowserContentTranslateDriverObserver; |
| 51 class BrowserInstantController; | 54 class BrowserInstantController; |
| 52 class BrowserSyncedWindowDelegate; | 55 class BrowserSyncedWindowDelegate; |
| 53 class BrowserToolbarModelDelegate; | 56 class BrowserToolbarModelDelegate; |
| 54 class BrowserTabRestoreServiceDelegate; | 57 class BrowserTabRestoreServiceDelegate; |
| 55 class BrowserWindow; | 58 class BrowserWindow; |
| 56 class FindBarController; | 59 class FindBarController; |
| 57 class FullscreenController; | 60 class FullscreenController; |
| 58 class PrefService; | 61 class PrefService; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 class Browser : public TabStripModelObserver, | 104 class Browser : public TabStripModelObserver, |
| 102 public content::WebContentsDelegate, | 105 public content::WebContentsDelegate, |
| 103 public CoreTabHelperDelegate, | 106 public CoreTabHelperDelegate, |
| 104 public SearchEngineTabHelperDelegate, | 107 public SearchEngineTabHelperDelegate, |
| 105 public SearchTabHelperDelegate, | 108 public SearchTabHelperDelegate, |
| 106 public ChromeWebModalDialogManagerDelegate, | 109 public ChromeWebModalDialogManagerDelegate, |
| 107 public BookmarkTabHelperDelegate, | 110 public BookmarkTabHelperDelegate, |
| 108 public ZoomObserver, | 111 public ZoomObserver, |
| 109 public content::PageNavigator, | 112 public content::PageNavigator, |
| 110 public content::NotificationObserver, | 113 public content::NotificationObserver, |
| 114 #if defined(ENABLE_EXTENSIONS) |
| 111 public extensions::ExtensionRegistryObserver, | 115 public extensions::ExtensionRegistryObserver, |
| 116 #endif |
| 112 public ui::SelectFileDialog::Listener { | 117 public ui::SelectFileDialog::Listener { |
| 113 public: | 118 public: |
| 114 // SessionService::WindowType mirrors these values. If you add to this | 119 // SessionService::WindowType mirrors these values. If you add to this |
| 115 // enum, look at SessionService::WindowType to see if it needs to be | 120 // enum, look at SessionService::WindowType to see if it needs to be |
| 116 // updated. | 121 // updated. |
| 117 enum Type { | 122 enum Type { |
| 118 // If you add a new type, consider updating the test | 123 // If you add a new type, consider updating the test |
| 119 // BrowserTest.StartMaximized. | 124 // BrowserTest.StartMaximized. |
| 120 TYPE_TABBED = 1, | 125 TYPE_TABBED = 1, |
| 121 TYPE_POPUP = 2 | 126 TYPE_POPUP = 2 |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 virtual void FileSelectedWithExtraInfo( | 714 virtual void FileSelectedWithExtraInfo( |
| 710 const ui::SelectedFileInfo& file_info, | 715 const ui::SelectedFileInfo& file_info, |
| 711 int index, | 716 int index, |
| 712 void* params) override; | 717 void* params) override; |
| 713 | 718 |
| 714 // Overridden from content::NotificationObserver: | 719 // Overridden from content::NotificationObserver: |
| 715 virtual void Observe(int type, | 720 virtual void Observe(int type, |
| 716 const content::NotificationSource& source, | 721 const content::NotificationSource& source, |
| 717 const content::NotificationDetails& details) override; | 722 const content::NotificationDetails& details) override; |
| 718 | 723 |
| 724 #if defined(ENABLE_EXTENSIONS) |
| 719 // Overridden from extensions::ExtensionRegistryObserver: | 725 // Overridden from extensions::ExtensionRegistryObserver: |
| 720 virtual void OnExtensionUninstalled( | 726 virtual void OnExtensionUninstalled( |
| 721 content::BrowserContext* browser_context, | 727 content::BrowserContext* browser_context, |
| 722 const extensions::Extension* extension, | 728 const extensions::Extension* extension, |
| 723 extensions::UninstallReason reason) override; | 729 extensions::UninstallReason reason) override; |
| 724 virtual void OnExtensionLoaded( | 730 virtual void OnExtensionLoaded( |
| 725 content::BrowserContext* browser_context, | 731 content::BrowserContext* browser_context, |
| 726 const extensions::Extension* extension) override; | 732 const extensions::Extension* extension) override; |
| 727 virtual void OnExtensionUnloaded( | 733 virtual void OnExtensionUnloaded( |
| 728 content::BrowserContext* browser_context, | 734 content::BrowserContext* browser_context, |
| 729 const extensions::Extension* extension, | 735 const extensions::Extension* extension, |
| 730 extensions::UnloadedExtensionInfo::Reason reason) override; | 736 extensions::UnloadedExtensionInfo::Reason reason) override; |
| 737 #endif |
| 731 | 738 |
| 732 // Command and state updating /////////////////////////////////////////////// | 739 // Command and state updating /////////////////////////////////////////////// |
| 733 | 740 |
| 734 // Handle changes to kDevTools preference. | 741 // Handle changes to kDevTools preference. |
| 735 void OnDevToolsDisabledChanged(); | 742 void OnDevToolsDisabledChanged(); |
| 736 | 743 |
| 737 // UI update coalescing and handling //////////////////////////////////////// | 744 // UI update coalescing and handling //////////////////////////////////////// |
| 738 | 745 |
| 739 // Asks the toolbar (and as such the location bar) to update its state to | 746 // Asks the toolbar (and as such the location bar) to update its state to |
| 740 // reflect the current tab's current URL, security state, etc. | 747 // reflect the current tab's current URL, security state, etc. |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 const GURL& target_url, | 842 const GURL& target_url, |
| 836 const std::string& partition_id, | 843 const std::string& partition_id, |
| 837 content::SessionStorageNamespace* session_storage_namespace); | 844 content::SessionStorageNamespace* session_storage_namespace); |
| 838 | 845 |
| 839 // Data members ///////////////////////////////////////////////////////////// | 846 // Data members ///////////////////////////////////////////////////////////// |
| 840 | 847 |
| 841 std::vector<InterstitialObserver*> interstitial_observers_; | 848 std::vector<InterstitialObserver*> interstitial_observers_; |
| 842 | 849 |
| 843 content::NotificationRegistrar registrar_; | 850 content::NotificationRegistrar registrar_; |
| 844 | 851 |
| 852 #if defined(ENABLE_EXTENSIONS) |
| 845 ScopedObserver<extensions::ExtensionRegistry, | 853 ScopedObserver<extensions::ExtensionRegistry, |
| 846 extensions::ExtensionRegistryObserver> | 854 extensions::ExtensionRegistryObserver> |
| 847 extension_registry_observer_; | 855 extension_registry_observer_; |
| 856 #endif |
| 848 | 857 |
| 849 PrefChangeRegistrar profile_pref_registrar_; | 858 PrefChangeRegistrar profile_pref_registrar_; |
| 850 | 859 |
| 851 // This Browser's type. | 860 // This Browser's type. |
| 852 const Type type_; | 861 const Type type_; |
| 853 | 862 |
| 854 // This Browser's profile. | 863 // This Browser's profile. |
| 855 Profile* const profile_; | 864 Profile* const profile_; |
| 856 | 865 |
| 857 // This Browser's window. | 866 // This Browser's window. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 | 988 |
| 980 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_; | 989 scoped_ptr<chrome::ValidationMessageBubble> validation_message_bubble_; |
| 981 | 990 |
| 982 // The following factory is used to close the frame at a later time. | 991 // The following factory is used to close the frame at a later time. |
| 983 base::WeakPtrFactory<Browser> weak_factory_; | 992 base::WeakPtrFactory<Browser> weak_factory_; |
| 984 | 993 |
| 985 DISALLOW_COPY_AND_ASSIGN(Browser); | 994 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 986 }; | 995 }; |
| 987 | 996 |
| 988 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 997 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
| OLD | NEW |