diff options
Diffstat (limited to 'chrome/browser/ui/webui/options')
29 files changed, 148 insertions, 134 deletions
diff --git a/chrome/browser/ui/webui/options/advanced_options_handler.cc b/chrome/browser/ui/webui/options/advanced_options_handler.cc index d3c7fdf..d1a3750 100644 --- a/chrome/browser/ui/webui/options/advanced_options_handler.cc +++ b/chrome/browser/ui/webui/options/advanced_options_handler.cc @@ -31,7 +31,7 @@ #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/tab_contents/tab_contents_view.h" #include "content/browser/user_metrics.h" -#include "content/common/notification_details.h" +#include "content/public/browser/notification_details.h" #include "content/public/browser/notification_types.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -300,11 +300,12 @@ void AdvancedOptionsHandler::RegisterMessages() { #endif } -void AdvancedOptionsHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void AdvancedOptionsHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_PREF_CHANGED) { - std::string* pref_name = Details<std::string>(details).ptr(); + std::string* pref_name = content::Details<std::string>(details).ptr(); if (*pref_name == prefs::kDownloadExtensionsToOpen) { SetupAutoOpenFileTypesDisabledAttribute(); } else if (proxy_prefs_->IsObserved(*pref_name)) { diff --git a/chrome/browser/ui/webui/options/advanced_options_handler.h b/chrome/browser/ui/webui/options/advanced_options_handler.h index 8b8b853..30e9c7a 100644 --- a/chrome/browser/ui/webui/options/advanced_options_handler.h +++ b/chrome/browser/ui/webui/options/advanced_options_handler.h @@ -31,10 +31,10 @@ class AdvancedOptionsHandler virtual WebUIMessageHandler* Attach(WebUI* web_ui); virtual void RegisterMessages(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // SelectFileDialog::Listener implementation virtual void FileSelected(const FilePath& path, int index, void* params); diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc index 7ec40b4..cd57df8 100644 --- a/chrome/browser/ui/webui/options/browser_options_handler.cc +++ b/chrome/browser/ui/webui/options/browser_options_handler.cc @@ -31,8 +31,8 @@ #include "chrome/common/url_constants.h" #include "content/browser/browser_thread.h" #include "content/browser/user_metrics.h" -#include "content/common/notification_details.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_source.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" @@ -335,11 +335,12 @@ void BrowserOptionsHandler::OnItemsRemoved(int start, int length) { OnModelChanged(); } -void BrowserOptionsHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void BrowserOptionsHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_PREF_CHANGED) { - std::string* pref = Details<std::string>(details).ptr(); + std::string* pref = content::Details<std::string>(details).ptr(); if (*pref == prefs::kDefaultBrowserSettingEnabled) { UpdateDefaultBrowserState(); } else if (*pref == prefs::kURLsToRestoreOnStartup) { diff --git a/chrome/browser/ui/webui/options/browser_options_handler.h b/chrome/browser/ui/webui/options/browser_options_handler.h index bee1037..ea357d1 100644 --- a/chrome/browser/ui/webui/options/browser_options_handler.h +++ b/chrome/browser/ui/webui/options/browser_options_handler.h @@ -53,10 +53,10 @@ class BrowserOptionsHandler : public OptionsPageUIHandler, virtual void OnItemsRemoved(int start, int length) OVERRIDE; private: - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Makes this the default browser. Called from WebUI. void BecomeDefaultBrowser(const ListValue* args); diff --git a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc index 8ef9fb7..8a926d0 100644 --- a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc +++ b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc @@ -336,9 +336,10 @@ void ChangePictureOptionsHandler::OnCameraPresenceCheckDone() { CameraDetector::kCameraPresent); } -void ChangePictureOptionsHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void ChangePictureOptionsHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { OptionsPageUIHandler::Observe(type, source, details); // User profile image is currently set and it has been updated by UserManager. if (type == chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED) diff --git a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h index 00b1a00..0008650 100644 --- a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h +++ b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h @@ -10,7 +10,7 @@ #include "chrome/browser/chromeos/options/take_photo_dialog.h" #include "chrome/browser/ui/shell_dialogs.h" #include "chrome/browser/ui/webui/options/options_ui.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_registrar.h" #include "ui/gfx/native_widget_types.h" namespace base { @@ -79,10 +79,10 @@ class ChangePictureOptionsHandler : public OptionsPageUIHandler, // ProfileImageDownloader::Delegate implementation. virtual void OnDownloadSuccess(const SkBitmap& image) OVERRIDE; - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Called when the camera presence check has been completed. void OnCameraPresenceCheckDone(); @@ -106,7 +106,7 @@ class ChangePictureOptionsHandler : public OptionsPageUIHandler, // Downloads user profile image when it's not set as current image. scoped_ptr<ProfileImageDownloader> profile_image_downloader_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; base::WeakPtrFactory<ChangePictureOptionsHandler> weak_factory_; diff --git a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc index 295b834..cceefd4 100644 --- a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc +++ b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc @@ -11,8 +11,8 @@ #include "chrome/browser/chromeos/cros_settings.h" #include "chrome/common/chrome_notification_types.h" #include "content/browser/user_metrics.h" -#include "content/common/notification_details.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_source.h" namespace chromeos { @@ -59,9 +59,10 @@ void CoreChromeOSOptionsHandler::StopObservingPref(const std::string& path) { ::CoreOptionsHandler::StopObservingPref(path); } -void CoreChromeOSOptionsHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void CoreChromeOSOptionsHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { // Ignore the notification if this instance had caused it. if (handling_change_) return; diff --git a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h index 6c18fe0..b65578b 100644 --- a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h +++ b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h @@ -24,10 +24,10 @@ class CoreChromeOSOptionsHandler : public CoreOptionsHandler { const std::string& metric); virtual void StopObservingPref(const std::string& path); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: // Notifies registered JS callbacks on ChromeOS setting change. diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc index 7f1399f..36b113c 100644 --- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc +++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc @@ -575,9 +575,10 @@ void InternetOptionsHandler::OnCellularDataPlanChanged( } -void InternetOptionsHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void InternetOptionsHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { chromeos::CrosOptionsPageUIHandler::Observe(type, source, details); if (type == chrome::NOTIFICATION_REQUIRE_PIN_SETTING_CHANGE_ENDED) { base::FundamentalValue require_pin(*Details<bool>(details).ptr()); diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.h b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.h index 78063af..916be72 100644 --- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.h +++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.h @@ -10,7 +10,7 @@ #include "chrome/browser/chromeos/cros/network_library.h" #include "chrome/browser/chromeos/proxy_cros_settings_provider.h" #include "chrome/browser/ui/webui/options/chromeos/cros_options_page_ui_handler.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_registrar.h" #include "ui/gfx/native_widget_types.h" class SkBitmap; @@ -43,10 +43,10 @@ class InternetOptionsHandler // NetworkLibrary::CellularDataPlanObserver implementation. virtual void OnCellularDataPlanChanged(chromeos::NetworkLibrary* network_lib); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; private: // Opens a modal popup dialog. @@ -143,7 +143,7 @@ class InternetOptionsHandler // Convenience pointer to netwrok library (will not change). chromeos::NetworkLibrary* cros_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; chromeos::ProxyCrosSettingsProvider* proxy_settings_; diff --git a/chrome/browser/ui/webui/options/chromeos/virtual_keyboard_manager_handler.cc b/chrome/browser/ui/webui/options/chromeos/virtual_keyboard_manager_handler.cc index cde1d0d..1e44643 100644 --- a/chrome/browser/ui/webui/options/chromeos/virtual_keyboard_manager_handler.cc +++ b/chrome/browser/ui/webui/options/chromeos/virtual_keyboard_manager_handler.cc @@ -22,8 +22,8 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" -#include "content/common/notification_details.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_source.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" diff --git a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc index acca585..677d07a 100644 --- a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc +++ b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc @@ -13,7 +13,7 @@ #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/pref_names.h" -#include "content/common/notification_details.h" +#include "content/public/browser/notification_details.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc index 12761b6..2e332c7 100644 --- a/chrome/browser/ui/webui/options/content_settings_handler.cc +++ b/chrome/browser/ui/webui/options/content_settings_handler.cc @@ -29,7 +29,7 @@ #include "chrome/common/url_constants.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/common/notification_service.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" #include "content/public/common/content_switches.h" #include "grit/generated_resources.h" @@ -293,19 +293,20 @@ void ContentSettingsHandler::Initialize() { Profile* profile = Profile::FromWebUI(web_ui_); notification_registrar_.Add( this, chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED, - Source<Profile>(profile)); + content::Source<Profile>(profile)); PrefService* prefs = profile->GetPrefs(); pref_change_registrar_.Init(prefs); pref_change_registrar_.Add(prefs::kGeolocationContentSettings, this); } -void ContentSettingsHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void ContentSettingsHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case chrome::NOTIFICATION_PROFILE_DESTROYED: { - if (Source<Profile>(source).ptr()->IsOffTheRecord()) { + if (content::Source<Profile>(source).ptr()->IsOffTheRecord()) { web_ui_->CallJavascriptFunction( "ContentSettingsExceptionsArea.OTRProfileDestroyed"); } @@ -313,7 +314,7 @@ void ContentSettingsHandler::Observe(int type, } case chrome::NOTIFICATION_PROFILE_CREATED: { - if (Source<Profile>(source).ptr()->IsOffTheRecord()) + if (content::Source<Profile>(source).ptr()->IsOffTheRecord()) UpdateAllOTRExceptionsViewsFromModel(); break; } @@ -321,13 +322,13 @@ void ContentSettingsHandler::Observe(int type, case chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED: { // Filter out notifications from other profiles. HostContentSettingsMap* map = - Source<HostContentSettingsMap>(source).ptr(); + content::Source<HostContentSettingsMap>(source).ptr(); if (map != GetContentSettingsMap() && map != GetOTRContentSettingsMap()) break; const ContentSettingsDetails* settings_details = - Details<const ContentSettingsDetails>(details).ptr(); + content::Details<const ContentSettingsDetails>(details).ptr(); // TODO(estade): we pretend update_all() is always true. if (settings_details->update_all_types()) @@ -338,7 +339,8 @@ void ContentSettingsHandler::Observe(int type, } case chrome::NOTIFICATION_PREF_CHANGED: { - const std::string& pref_name = *Details<std::string>(details).ptr(); + const std::string& pref_name = + *content::Details<std::string>(details).ptr(); if (pref_name == prefs::kGeolocationContentSettings) UpdateGeolocationExceptionsView(); break; diff --git a/chrome/browser/ui/webui/options/content_settings_handler.h b/chrome/browser/ui/webui/options/content_settings_handler.h index f183936..22d0290 100644 --- a/chrome/browser/ui/webui/options/content_settings_handler.h +++ b/chrome/browser/ui/webui/options/content_settings_handler.h @@ -10,8 +10,8 @@ #include "chrome/browser/prefs/pref_change_registrar.h" #include "chrome/browser/ui/webui/options/options_ui.h" #include "chrome/common/content_settings_types.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" class HostContentSettingsMap; class ProtocolHandlerRegistry; @@ -28,10 +28,10 @@ class ContentSettingsHandler : public OptionsPageUIHandler { virtual void RegisterMessages(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Gets a string identifier for the group name, for use in HTML. static std::string ContentSettingsTypeToGroupName(ContentSettingsType type); @@ -106,7 +106,7 @@ class ContentSettingsHandler : public OptionsPageUIHandler { // Member variables --------------------------------------------------------- - NotificationRegistrar notification_registrar_; + content::NotificationRegistrar notification_registrar_; PrefChangeRegistrar pref_change_registrar_; DISALLOW_COPY_AND_ASSIGN(ContentSettingsHandler); diff --git a/chrome/browser/ui/webui/options/core_options_handler.cc b/chrome/browser/ui/webui/options/core_options_handler.cc index 5b62893..0e17749 100644 --- a/chrome/browser/ui/webui/options/core_options_handler.cc +++ b/chrome/browser/ui/webui/options/core_options_handler.cc @@ -21,7 +21,7 @@ #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "content/browser/user_metrics.h" -#include "content/common/notification_details.h" +#include "content/public/browser/notification_details.h" #include "content/public/browser/notification_types.h" #include "googleurl/src/gurl.h" #include "grit/chromium_strings.h" @@ -136,10 +136,10 @@ WebUIMessageHandler* CoreOptionsHandler::Attach(WebUI* web_ui) { } void CoreOptionsHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_PREF_CHANGED) - NotifyPrefChanged(Details<std::string>(details).ptr()); + NotifyPrefChanged(content::Details<std::string>(details).ptr()); } void CoreOptionsHandler::RegisterMessages() { diff --git a/chrome/browser/ui/webui/options/core_options_handler.h b/chrome/browser/ui/webui/options/core_options_handler.h index 976aa77..e077857 100644 --- a/chrome/browser/ui/webui/options/core_options_handler.h +++ b/chrome/browser/ui/webui/options/core_options_handler.h @@ -26,10 +26,10 @@ class CoreOptionsHandler : public OptionsPageUIHandler { virtual void GetLocalizedValues(DictionaryValue* localized_strings); virtual void Uninitialize(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // WebUIMessageHandler implementation. virtual void RegisterMessages(); diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.cc b/chrome/browser/ui/webui/options/extension_settings_handler.cc index 20df554..5ee7afa 100644 --- a/chrome/browser/ui/webui/options/extension_settings_handler.cc +++ b/chrome/browser/ui/webui/options/extension_settings_handler.cc @@ -205,15 +205,15 @@ void ExtensionSettingsHandler::MaybeRegisterForNotifications() { // Register for notifications that we need to reload the page. registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, - Source<Profile>(profile)); + content::Source<Profile>(profile)); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_CREATED, - Source<Profile>(profile)); + content::Source<Profile>(profile)); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, - Source<Profile>(profile)); + content::Source<Profile>(profile)); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED, - Source<Profile>(profile)); + content::Source<Profile>(profile)); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_WARNING_CHANGED, - Source<Profile>(profile)); + content::Source<Profile>(profile)); registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, NotificationService::AllBrowserContextsAndSources()); @@ -232,7 +232,7 @@ void ExtensionSettingsHandler::MaybeRegisterForNotifications() { registrar_.Add( this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED, - Source<ExtensionPrefs>(profile->GetExtensionService()-> + content::Source<ExtensionPrefs>(profile->GetExtensionService()-> extension_prefs())); } @@ -584,9 +584,10 @@ WebUIMessageHandler* ExtensionSettingsHandler::Attach(WebUI* web_ui) { return handler; } -void ExtensionSettingsHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void ExtensionSettingsHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { Profile* profile = Profile::FromWebUI(web_ui_); Profile* source_profile = NULL; switch (type) { @@ -605,28 +606,30 @@ void ExtensionSettingsHandler::Observe(int type, // Doing it this way gets everything but causes the page to be rendered // more than we need. It doesn't seem to result in any noticeable flicker. case content::NOTIFICATION_RENDER_VIEW_HOST_DELETED: - deleting_rvh_ = Source<RenderViewHost>(source).ptr(); + deleting_rvh_ = content::Source<RenderViewHost>(source).ptr(); // Fall through. case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED: source_profile = Profile::FromBrowserContext( - Source<RenderViewHost>(source)->site_instance()-> + content::Source<RenderViewHost>(source)->site_instance()-> browsing_instance()->browser_context()); if (!profile->IsSameProfile(source_profile)) return; MaybeUpdateAfterNotification(); break; case chrome::NOTIFICATION_BACKGROUND_CONTENTS_DELETED: - deleting_rvh_ = Details<BackgroundContents>(details)->render_view_host(); + deleting_rvh_ = + content::Details<BackgroundContents>(details)->render_view_host(); // Fall through. case chrome::NOTIFICATION_BACKGROUND_CONTENTS_NAVIGATED: - source_profile = Source<Profile>(source).ptr(); + source_profile = content::Source<Profile>(source).ptr(); if (!profile->IsSameProfile(source_profile)) return; MaybeUpdateAfterNotification(); break; case content::NOTIFICATION_NAV_ENTRY_COMMITTED: source_profile = Profile::FromBrowserContext( - Source<NavigationController>(source).ptr()->browser_context()); + content::Source<NavigationController>( + source).ptr()->browser_context()); if (!profile->IsSameProfile(source_profile)) return; MaybeUpdateAfterNotification(); diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.h b/chrome/browser/ui/webui/options/extension_settings_handler.h index 270adc9..c2c173e 100644 --- a/chrome/browser/ui/webui/options/extension_settings_handler.h +++ b/chrome/browser/ui/webui/options/extension_settings_handler.h @@ -16,8 +16,8 @@ #include "chrome/browser/ui/webui/options/options_ui.h" #include "chrome/browser/ui/webui/chrome_web_ui.h" #include "chrome/common/extensions/extension_resource.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "googleurl/src/gurl.h" class Extension; @@ -142,10 +142,10 @@ class ExtensionSettingsHandler : public OptionsPageUIHandler, base::DictionaryValue* localized_strings) OVERRIDE; virtual void Initialize() OVERRIDE; - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // ExtensionUninstallDialog::Delegate implementation, used for receiving // notification about uninstall confirmation dialog selections. diff --git a/chrome/browser/ui/webui/options/font_settings_handler.cc b/chrome/browser/ui/webui/options/font_settings_handler.cc index 64157302..f319244 100644 --- a/chrome/browser/ui/webui/options/font_settings_handler.cc +++ b/chrome/browser/ui/webui/options/font_settings_handler.cc @@ -20,7 +20,7 @@ #include "chrome/browser/ui/webui/options/font_settings_utils.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" -#include "content/common/notification_details.h" +#include "content/public/browser/notification_details.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" @@ -153,10 +153,10 @@ void FontSettingsHandler::FontsListHasLoaded( } void FontSettingsHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_PREF_CHANGED) { - std::string* pref_name = Details<std::string>(details).ptr(); + std::string* pref_name = content::Details<std::string>(details).ptr(); if (*pref_name == prefs::kWebKitStandardFontFamily) { SetUpStandardFontSample(); } else if (*pref_name == prefs::kWebKitSerifFontFamily) { diff --git a/chrome/browser/ui/webui/options/font_settings_handler.h b/chrome/browser/ui/webui/options/font_settings_handler.h index 5fc38f1..4ac650c 100644 --- a/chrome/browser/ui/webui/options/font_settings_handler.h +++ b/chrome/browser/ui/webui/options/font_settings_handler.h @@ -24,10 +24,10 @@ class FontSettingsHandler : public OptionsPageUIHandler { virtual WebUIMessageHandler* Attach(WebUI* web_ui); virtual void RegisterMessages(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: void HandleFetchFontsData(const ListValue* args); diff --git a/chrome/browser/ui/webui/options/handler_options_handler.cc b/chrome/browser/ui/webui/options/handler_options_handler.cc index c0002d7..1cf2a96 100644 --- a/chrome/browser/ui/webui/options/handler_options_handler.cc +++ b/chrome/browser/ui/webui/options/handler_options_handler.cc @@ -47,7 +47,7 @@ void HandlerOptionsHandler::Initialize() { UpdateHandlerList(); notification_registrar_.Add( this, chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED, - Source<Profile>(Profile::FromWebUI(web_ui_))); + content::Source<Profile>(Profile::FromWebUI(web_ui_))); } void HandlerOptionsHandler::RegisterMessages() { @@ -196,9 +196,10 @@ ProtocolHandler HandlerOptionsHandler::ParseHandlerFromArgs( title); } -void HandlerOptionsHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void HandlerOptionsHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED) UpdateHandlerList(); else diff --git a/chrome/browser/ui/webui/options/handler_options_handler.h b/chrome/browser/ui/webui/options/handler_options_handler.h index 33132b1..4b37abc 100644 --- a/chrome/browser/ui/webui/options/handler_options_handler.h +++ b/chrome/browser/ui/webui/options/handler_options_handler.h @@ -10,7 +10,7 @@ #include "chrome/browser/custom_handlers/protocol_handler_registry.h" #include "chrome/browser/ui/webui/options/options_ui.h" #include "chrome/common/custom_handlers/protocol_handler.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_registrar.h" namespace base { class DictionaryValue; @@ -26,10 +26,10 @@ class HandlerOptionsHandler : public OptionsPageUIHandler { virtual void Initialize(); virtual void RegisterMessages(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: // Called when the user toggles whether custom handlers are enabled. @@ -67,7 +67,7 @@ class HandlerOptionsHandler : public OptionsPageUIHandler { ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); - NotificationRegistrar notification_registrar_; + content::NotificationRegistrar notification_registrar_; DISALLOW_COPY_AND_ASSIGN(HandlerOptionsHandler); }; diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc index 0287dfa..b9fb4d2 100644 --- a/chrome/browser/ui/webui/options/manage_profile_handler.cc +++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc @@ -63,9 +63,10 @@ void ManageProfileHandler::RegisterMessages() { base::Unretained(this))); } -void ManageProfileHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void ManageProfileHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED) SendProfileNames(); else diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.h b/chrome/browser/ui/webui/options/manage_profile_handler.h index c3e535c..fc36576 100644 --- a/chrome/browser/ui/webui/options/manage_profile_handler.h +++ b/chrome/browser/ui/webui/options/manage_profile_handler.h @@ -21,10 +21,10 @@ class ManageProfileHandler : public OptionsPageUIHandler { // WebUIMessageHandler: virtual void RegisterMessages(); - // NotificationObserver: + // content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: // Callback for the "requestDefaultProfileIcons" message. diff --git a/chrome/browser/ui/webui/options/options_ui.h b/chrome/browser/ui/webui/options/options_ui.h index 8dd9626..69813f8 100644 --- a/chrome/browser/ui/webui/options/options_ui.h +++ b/chrome/browser/ui/webui/options/options_ui.h @@ -12,8 +12,8 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/ui/webui/chrome_url_data_manager.h" #include "chrome/browser/ui/webui/chrome_web_ui.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_types.h" class GURL; @@ -22,7 +22,7 @@ struct UserMetricsAction; // The base class handler of Javascript messages of options pages. class OptionsPageUIHandler : public WebUIMessageHandler, - public NotificationObserver { + public content::NotificationObserver { public: OptionsPageUIHandler(); virtual ~OptionsPageUIHandler(); @@ -43,10 +43,10 @@ class OptionsPageUIHandler : public WebUIMessageHandler, // WebUIMessageHandler implementation. virtual void RegisterMessages() OVERRIDE {} - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE {} + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE {} protected: struct OptionsStringResource { @@ -65,7 +65,7 @@ class OptionsPageUIHandler : public WebUIMessageHandler, const std::string& variable_name, int title_id); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; private: DISALLOW_COPY_AND_ASSIGN(OptionsPageUIHandler); diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc index 638f29c..50c904b 100644 --- a/chrome/browser/ui/webui/options/password_manager_handler.cc +++ b/chrome/browser/ui/webui/options/password_manager_handler.cc @@ -14,8 +14,8 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" -#include "content/common/notification_details.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_source.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "net/base/net_util.h" @@ -120,11 +120,12 @@ PasswordStore* PasswordManagerHandler::GetPasswordStore() { GetPasswordStore(Profile::EXPLICIT_ACCESS); } -void PasswordManagerHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void PasswordManagerHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_PREF_CHANGED) { - std::string* pref_name = Details<std::string>(details).ptr(); + std::string* pref_name = content::Details<std::string>(details).ptr(); if (*pref_name == prefs::kPasswordManagerAllowShowPasswords) { UpdatePasswordLists(NULL); } diff --git a/chrome/browser/ui/webui/options/password_manager_handler.h b/chrome/browser/ui/webui/options/password_manager_handler.h index 9b1e8f2..1fe9a9d 100644 --- a/chrome/browser/ui/webui/options/password_manager_handler.h +++ b/chrome/browser/ui/webui/options/password_manager_handler.h @@ -28,10 +28,10 @@ class PasswordManagerHandler : public OptionsPageUIHandler, // PasswordStore::Observer implementation. virtual void OnLoginsChanged(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: // The password store associated with the currently active profile. diff --git a/chrome/browser/ui/webui/options/personal_options_handler.cc b/chrome/browser/ui/webui/options/personal_options_handler.cc index a8b97ec..434766c 100644 --- a/chrome/browser/ui/webui/options/personal_options_handler.cc +++ b/chrome/browser/ui/webui/options/personal_options_handler.cc @@ -220,9 +220,10 @@ void PersonalOptionsHandler::RegisterMessages() { base::Unretained(this))); } -void PersonalOptionsHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void PersonalOptionsHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_BROWSER_THEME_CHANGED) { ObserveThemeChanged(); } else if (multiprofile_ && @@ -345,8 +346,8 @@ void PersonalOptionsHandler::Initialize() { // Listen for theme installation. registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>(ThemeServiceFactory::GetForProfile( - profile))); + content::Source<ThemeService>( + ThemeServiceFactory::GetForProfile(profile))); registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, NotificationService::AllSources()); ObserveThemeChanged(); diff --git a/chrome/browser/ui/webui/options/personal_options_handler.h b/chrome/browser/ui/webui/options/personal_options_handler.h index 4daee0b..a37b967 100644 --- a/chrome/browser/ui/webui/options/personal_options_handler.h +++ b/chrome/browser/ui/webui/options/personal_options_handler.h @@ -10,7 +10,7 @@ #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/ui/webui/options/options_ui.h" #if defined(OS_CHROMEOS) -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_registrar.h" #endif // Chrome personal options page UI handler. @@ -27,10 +27,10 @@ class PersonalOptionsHandler : public OptionsPageUIHandler, // WebUIMessageHandler implementation. virtual void RegisterMessages(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // ProfileSyncServiceObserver implementation. virtual void OnStateChanged(); @@ -44,7 +44,7 @@ class PersonalOptionsHandler : public OptionsPageUIHandler, #if defined(OS_CHROMEOS) void UpdateAccountPicture(); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; #endif // Sends an array of Profile objects to javascript. |