diff options
Diffstat (limited to 'chrome/browser/ui/webui')
67 files changed, 377 insertions, 352 deletions
diff --git a/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc b/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc index 25e40db..59faec3 100644 --- a/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc +++ b/chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc @@ -6,14 +6,14 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" #include "content/browser/tab_contents/navigation_details.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_registrar.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" namespace { -class NavigationNotificationObserver : public NotificationObserver { +class NavigationNotificationObserver : public content::NotificationObserver { public: NavigationNotificationObserver() : got_navigation_(false), @@ -23,12 +23,12 @@ class NavigationNotificationObserver : public NotificationObserver { } virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE { + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE { DCHECK_EQ(content::NOTIFICATION_NAV_ENTRY_COMMITTED, type); got_navigation_ = true; http_status_code_ = - Details<content::LoadCommittedDetails>(details)-> + content::Details<content::LoadCommittedDetails>(details)-> http_status_code; } @@ -36,7 +36,7 @@ class NavigationNotificationObserver : public NotificationObserver { bool got_navigation() const { return got_navigation_; } private: - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; int got_navigation_; int http_status_code_; diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc index ebcfb89..8948d5a 100644 --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc @@ -28,8 +28,8 @@ #include "chrome/common/net/gaia/gaia_urls.h" #include "chrome/common/url_constants.h" #include "content/browser/tab_contents/tab_contents.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/common/notification_service.h" #include "grit/generated_resources.h" #include "net/base/dnsrr_resolver.h" @@ -92,7 +92,7 @@ namespace chromeos { // changed. Also, it answers to the requests about current network state. class NetworkStateInformer : public chromeos::NetworkLibrary::NetworkManagerObserver, - public NotificationObserver { + public content::NotificationObserver { public: explicit NetworkStateInformer(WebUI* web_ui); virtual ~NetworkStateInformer(); @@ -109,10 +109,10 @@ class NetworkStateInformer // NetworkLibrary::NetworkManagerObserver implementation: virtual void OnNetworkManagerChanged(chromeos::NetworkLibrary* cros) 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; private: enum State {OFFLINE, ONLINE, CAPTIVE_PORTAL}; @@ -120,7 +120,7 @@ class NetworkStateInformer void SendStateToObservers(const std::string& reason); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; base::hash_set<std::string> observers_; std::string active_network_; std::string network_name_; @@ -167,9 +167,10 @@ void NetworkStateInformer::OnNetworkManagerChanged(NetworkLibrary* cros) { } } -void NetworkStateInformer::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void NetworkStateInformer::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_LOGIN_PROXY_CHANGED); SendStateToObservers(kReasonProxyChanged); } diff --git a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc index 08de306..4509a2f 100644 --- a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc +++ b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc @@ -464,14 +464,14 @@ void SimUnlockHandler::NotifyOnEnterPinEnded(bool cancelled) { NotificationService::current()->Notify( chrome::NOTIFICATION_ENTER_PIN_ENDED, NotificationService::AllSources(), - Details<bool>(&cancelled)); + content::Details<bool>(&cancelled)); } void SimUnlockHandler::NotifyOnRequirePinChangeEnded(bool new_value) { NotificationService::current()->Notify( chrome::NOTIFICATION_REQUIRE_PIN_SETTING_CHANGE_ENDED, NotificationService::AllSources(), - Details<bool>(&new_value)); + content::Details<bool>(&new_value)); } void SimUnlockHandler::HandleCancel(const ListValue* args) { diff --git a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc index 4983d4a..d8fdd28 100644 --- a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc +++ b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc @@ -17,9 +17,9 @@ #include "content/browser/tab_contents/navigation_controller.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/tab_contents/tab_contents_view.h" -#include "content/common/notification_registrar.h" -#include "content/common/notification_source.h" #include "content/common/view_messages.h" +#include "content/public/browser/notification_registrar.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" // This module implements a sign in dialog for cloud print. @@ -31,20 +31,20 @@ namespace cloud_print_signin_dialog { // The flow handler sends our dialog to the correct URL, saves size info, // and closes the dialog when sign in is complete. class CloudPrintSigninFlowHandler : public WebUIMessageHandler, - public NotificationObserver { + public content::NotificationObserver { public: explicit CloudPrintSigninFlowHandler(TabContents* parent_tab); // 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; private: // Records the final size of the dialog in prefs. void StoreDialogSize(); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; TabContents* parent_tab_; }; @@ -60,13 +60,14 @@ void CloudPrintSigninFlowHandler::RegisterMessages() { pending_entry->set_url(CloudPrintURL( Profile::FromWebUI(web_ui_)).GetCloudPrintSigninURL()); registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, - Source<NavigationController>(controller)); + content::Source<NavigationController>(controller)); } } -void CloudPrintSigninFlowHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void CloudPrintSigninFlowHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) { GURL url = web_ui_->tab_contents()->GetURL(); GURL dialog_url = CloudPrintURL( diff --git a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc index 6ad7c74..a278ef0 100644 --- a/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc +++ b/chrome/browser/ui/webui/collected_cookies_ui_delegate.cc @@ -160,7 +160,7 @@ CollectedCookiesUIDelegate::CollectedCookiesUIDelegate( wrapper->profile()->GetHostContentSettingsMap(); registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, - Source<TabSpecificContentSettings>(content_settings)); + content::Source<TabSpecificContentSettings>(content_settings)); allowed_cookies_tree_model_.reset( content_settings->GetAllowedCookiesTreeModel()); @@ -250,9 +250,10 @@ void CollectedCookiesUIDelegate::AddContentException( } } -void CollectedCookiesUIDelegate::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void CollectedCookiesUIDelegate::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK_EQ(type, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN); CloseDialog(); } diff --git a/chrome/browser/ui/webui/collected_cookies_ui_delegate.h b/chrome/browser/ui/webui/collected_cookies_ui_delegate.h index 3f1a86c..2020967 100644 --- a/chrome/browser/ui/webui/collected_cookies_ui_delegate.h +++ b/chrome/browser/ui/webui/collected_cookies_ui_delegate.h @@ -13,8 +13,8 @@ #include "chrome/browser/ui/webui/cookies_tree_model_adapter.h" #include "chrome/browser/ui/webui/html_dialog_ui.h" #include "chrome/common/content_settings.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 GURL; class TabContents; @@ -26,7 +26,7 @@ class Size; class CollectedCookiesUIDelegate : public HtmlDialogUIDelegate, WebUIMessageHandler, - NotificationObserver { + content::NotificationObserver { public: virtual ~CollectedCookiesUIDelegate(); @@ -64,8 +64,8 @@ class CollectedCookiesUIDelegate : public HtmlDialogUIDelegate, // Notification Observer implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // JS callback to bind cookies tree models with JS trees. void BindCookiesTreeModel(const base::ListValue* args); @@ -75,7 +75,7 @@ class CollectedCookiesUIDelegate : public HtmlDialogUIDelegate, void Allow(const base::ListValue* args); void AllowThisSession(const base::ListValue* args); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; TabContentsWrapper* wrapper_; bool closed_; diff --git a/chrome/browser/ui/webui/conflicts_ui.cc b/chrome/browser/ui/webui/conflicts_ui.cc index 2dc9205..4bb477c 100644 --- a/chrome/browser/ui/webui/conflicts_ui.cc +++ b/chrome/browser/ui/webui/conflicts_ui.cc @@ -21,8 +21,8 @@ #include "chrome/common/url_constants.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/user_metrics.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/common/notification_service.h" #include "grit/browser_resources.h" #include "grit/chromium_strings.h" @@ -70,7 +70,7 @@ ChromeWebUIDataSource* CreateConflictsUIHTMLSource() { // The handler for JavaScript messages for the about:flags page. class ConflictsDOMHandler : public WebUIMessageHandler, - public NotificationObserver { + public content::NotificationObserver { public: ConflictsDOMHandler() {} virtual ~ConflictsDOMHandler() {} @@ -85,10 +85,10 @@ class ConflictsDOMHandler : public WebUIMessageHandler, void SendModuleList(); void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(ConflictsDOMHandler); }; @@ -133,8 +133,8 @@ void ConflictsDOMHandler::SendModuleList() { } void ConflictsDOMHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case chrome::NOTIFICATION_MODULE_LIST_ENUMERATED: SendModuleList(); diff --git a/chrome/browser/ui/webui/history2_ui.cc b/chrome/browser/ui/webui/history2_ui.cc index 48cb4fa..cf6988b 100644 --- a/chrome/browser/ui/webui/history2_ui.cc +++ b/chrome/browser/ui/webui/history2_ui.cc @@ -33,8 +33,8 @@ #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/tab_contents/tab_contents_delegate.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/browser_resources.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -108,7 +108,7 @@ WebUIMessageHandler* BrowsingHistoryHandler2::Attach(WebUI* web_ui) { // Get notifications when history is cleared. registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED, - Source<Profile>(profile->GetOriginalProfile())); + content::Source<Profile>(profile->GetOriginalProfile())); return WebUIMessageHandler::Attach(web_ui); } @@ -362,15 +362,16 @@ history::QueryOptions BrowsingHistoryHandler2::CreateMonthQueryOptions( return options; } -void BrowsingHistoryHandler2::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void BrowsingHistoryHandler2::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type != chrome::NOTIFICATION_HISTORY_URLS_DELETED) { NOTREACHED(); return; } history::URLsDeletedDetails* deletedDetails = - Details<history::URLsDeletedDetails>(details).ptr(); + content::Details<history::URLsDeletedDetails>(details).ptr(); if (deletedDetails->urls != urls_to_be_deleted_) { // Notify the page that someone else deleted from the history. web_ui_->CallJavascriptFunction("historyDeleted"); diff --git a/chrome/browser/ui/webui/history2_ui.h b/chrome/browser/ui/webui/history2_ui.h index 227647a..0e18566 100644 --- a/chrome/browser/ui/webui/history2_ui.h +++ b/chrome/browser/ui/webui/history2_ui.h @@ -13,7 +13,7 @@ #include "chrome/browser/ui/webui/chrome_url_data_manager.h" #include "chrome/browser/ui/webui/chrome_web_ui.h" #include "content/browser/cancelable_request.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_registrar.h" class GURL; @@ -40,7 +40,7 @@ class HistoryUIHTMLSource2 : public ChromeURLDataManager::DataSource { // The handler for Javascript messages related to the "history" view. class BrowsingHistoryHandler2 : public WebUIMessageHandler, - public NotificationObserver { + public content::NotificationObserver { public: BrowsingHistoryHandler2(); virtual ~BrowsingHistoryHandler2(); @@ -61,10 +61,10 @@ class BrowsingHistoryHandler2 : public WebUIMessageHandler, // Handle for "clearBrowsingData" message. void HandleClearBrowsingData(const base::ListValue* args); - // 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: // Callback from the history system when the history list is available. @@ -82,7 +82,7 @@ class BrowsingHistoryHandler2 : public WebUIMessageHandler, // Figure out the query options for a month-wide query. history::QueryOptions CreateMonthQueryOptions(int month); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Current search text. string16 search_text_; diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc index ba1a648..acc65c2 100644 --- a/chrome/browser/ui/webui/history_ui.cc +++ b/chrome/browser/ui/webui/history_ui.cc @@ -33,7 +33,7 @@ #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/tab_contents/tab_contents_delegate.h" #include "content/browser/user_metrics.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "grit/browser_resources.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -139,7 +139,7 @@ WebUIMessageHandler* BrowsingHistoryHandler::Attach(WebUI* web_ui) { // Get notifications when history is cleared. registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED, - Source<Profile>(profile->GetOriginalProfile())); + content::Source<Profile>(profile->GetOriginalProfile())); return WebUIMessageHandler::Attach(web_ui); } @@ -374,9 +374,10 @@ history::QueryOptions BrowsingHistoryHandler::CreateMonthQueryOptions( return options; } -void BrowsingHistoryHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void BrowsingHistoryHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type != chrome::NOTIFICATION_HISTORY_URLS_DELETED) { NOTREACHED(); return; diff --git a/chrome/browser/ui/webui/history_ui.h b/chrome/browser/ui/webui/history_ui.h index fd36429..4cf6fa0 100644 --- a/chrome/browser/ui/webui/history_ui.h +++ b/chrome/browser/ui/webui/history_ui.h @@ -13,13 +13,13 @@ #include "chrome/browser/ui/webui/chrome_url_data_manager.h" #include "chrome/browser/ui/webui/chrome_web_ui.h" #include "content/browser/cancelable_request.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_registrar.h" class GURL; // The handler for Javascript messages related to the "history" view. class BrowsingHistoryHandler : public WebUIMessageHandler, - public NotificationObserver { + public content::NotificationObserver { public: BrowsingHistoryHandler(); virtual ~BrowsingHistoryHandler(); @@ -40,10 +40,10 @@ class BrowsingHistoryHandler : public WebUIMessageHandler, // Handle for "clearBrowsingData" message. void HandleClearBrowsingData(const base::ListValue* args); - // 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: // Callback from the history system when the history list is available. @@ -61,7 +61,7 @@ class BrowsingHistoryHandler : public WebUIMessageHandler, // Figure out the query options for a month-wide query. history::QueryOptions CreateMonthQueryOptions(int month); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Current search text. string16 search_text_; diff --git a/chrome/browser/ui/webui/html_dialog_ui.cc b/chrome/browser/ui/webui/html_dialog_ui.cc index ca071a3..66c5046 100644 --- a/chrome/browser/ui/webui/html_dialog_ui.cc +++ b/chrome/browser/ui/webui/html_dialog_ui.cc @@ -70,7 +70,7 @@ void HtmlDialogUI::RenderViewCreated(RenderViewHost* render_view_host) { NotificationService::current()->Notify( chrome::NOTIFICATION_HTML_DIALOG_SHOWN, - Source<HtmlDialogUI>(this), + content::Source<HtmlDialogUI>(this), NotificationService::NoDetails()); } diff --git a/chrome/browser/ui/webui/media/media_internals_proxy.cc b/chrome/browser/ui/webui/media/media_internals_proxy.cc index 7af31df..c532e4e 100644 --- a/chrome/browser/ui/webui/media/media_internals_proxy.cc +++ b/chrome/browser/ui/webui/media/media_internals_proxy.cc @@ -30,11 +30,12 @@ MediaInternalsProxy::MediaInternalsProxy() NotificationService::AllBrowserContextsAndSources()); } -void MediaInternalsProxy::Observe(int type, const NotificationSource& source, - const NotificationDetails& details) { +void MediaInternalsProxy::Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK_EQ(type, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED); - RenderProcessHost* process = Source<RenderProcessHost>(source).ptr(); + RenderProcessHost* process = content::Source<RenderProcessHost>(source).ptr(); CallJavaScriptFunctionOnUIThread("media.onRendererTerminated", base::Value::CreateIntegerValue(process->id())); } diff --git a/chrome/browser/ui/webui/media/media_internals_proxy.h b/chrome/browser/ui/webui/media/media_internals_proxy.h index b2b5af4..3159736 100644 --- a/chrome/browser/ui/webui/media/media_internals_proxy.h +++ b/chrome/browser/ui/webui/media/media_internals_proxy.h @@ -11,8 +11,8 @@ #include "chrome/browser/media/media_internals_observer.h" #include "chrome/browser/net/chrome_net_log.h" #include "content/browser/browser_thread.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 IOThread; class MediaInternalsMessageHandler; @@ -31,14 +31,14 @@ class MediaInternalsProxy public base::RefCountedThreadSafe<MediaInternalsProxy, BrowserThread::DeleteOnUIThread>, public ChromeNetLog::ThreadSafeObserverImpl, - public NotificationObserver { + public content::NotificationObserver { public: MediaInternalsProxy(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Register a Handler and start receiving callbacks from MediaInternals. void Attach(MediaInternalsMessageHandler* handler); @@ -85,7 +85,7 @@ class MediaInternalsProxy MediaInternalsMessageHandler* handler_; IOThread* io_thread_; scoped_ptr<base::ListValue> pending_net_updates_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(MediaInternalsProxy); }; diff --git a/chrome/browser/ui/webui/metrics_handler.cc b/chrome/browser/ui/webui/metrics_handler.cc index dbe5ea3..e74edd5 100644 --- a/chrome/browser/ui/webui/metrics_handler.cc +++ b/chrome/browser/ui/webui/metrics_handler.cc @@ -100,6 +100,6 @@ void MetricsHandler::HandleLogEventTime(const ListValue* args) { } NotificationService::current()->Notify( chrome::NOTIFICATION_METRIC_EVENT_DURATION, - Source<TabContents>(tab), - Details<MetricEventDurationDetails>(&details)); + content::Source<TabContents>(tab), + content::Details<MetricEventDurationDetails>(&details)); } diff --git a/chrome/browser/ui/webui/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals_ui.cc index b730d47..302267b 100644 --- a/chrome/browser/ui/webui/net_internals_ui.cc +++ b/chrome/browser/ui/webui/net_internals_ui.cc @@ -41,7 +41,7 @@ #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "content/browser/browser_thread.h" -#include "content/common/notification_details.h" +#include "content/public/browser/notification_details.h" #include "grit/generated_resources.h" #include "grit/net_internals_resources.h" #include "net/base/escape.h" @@ -150,7 +150,7 @@ ChromeWebUIDataSource* CreateNetInternalsHTMLSource() { class NetInternalsMessageHandler : public WebUIMessageHandler, public base::SupportsWeakPtr<NetInternalsMessageHandler>, - public NotificationObserver { + public content::NotificationObserver { public: NetInternalsMessageHandler(); virtual ~NetInternalsMessageHandler(); @@ -164,10 +164,10 @@ class NetInternalsMessageHandler // message will be ignored. void SendJavascriptCommand(const std::string& command, Value* arg); - // 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; // Javascript message handlers. void OnRendererReady(const ListValue* list); @@ -570,13 +570,14 @@ void NetInternalsMessageHandler::SendJavascriptCommand( } } -void NetInternalsMessageHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void NetInternalsMessageHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK_EQ(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::kHttpThrottlingEnabled) { SendJavascriptCommand( "receivedHttpThrottlingEnabledPrefChanged", diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc index 132baa0..502adfb 100644 --- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc +++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc @@ -236,7 +236,7 @@ bool AppLauncherHandler::HandlePing(Profile* profile, const std::string& path) { WebUIMessageHandler* AppLauncherHandler::Attach(WebUI* web_ui) { registrar_.Add(this, chrome::NOTIFICATION_APP_INSTALLED_TO_NTP, - Source<TabContents>(web_ui->tab_contents())); + content::Source<TabContents>(web_ui->tab_contents())); return WebUIMessageHandler::Attach(web_ui); } @@ -280,11 +280,11 @@ void AppLauncherHandler::RegisterMessages() { } void AppLauncherHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_APP_INSTALLED_TO_NTP && NewTabUI::NTP4Enabled()) { - highlight_app_id_ = *Details<const std::string>(details).ptr(); + highlight_app_id_ = *content::Details<const std::string>(details).ptr(); if (has_loaded_apps_) SetAppToBeHighlighted(); return; @@ -295,11 +295,12 @@ void AppLauncherHandler::Observe(int type, switch (type) { case chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED: { - Profile* profile = Source<Profile>(source).ptr(); + Profile* profile = content::Source<Profile>(source).ptr(); if (!Profile::FromWebUI(web_ui_)->IsSameProfile(profile)) return; - const std::string& id = *Details<const std::string>(details).ptr(); + const std::string& id = + *content::Details<const std::string>(details).ptr(); const AppNotification* notification = extension_service_->app_notification_manager()->GetLast(id); base::StringValue id_value(id); @@ -315,7 +316,8 @@ void AppLauncherHandler::Observe(int type, } case chrome::NOTIFICATION_EXTENSION_LOADED: { - const Extension* extension = Details<const Extension>(details).ptr(); + const Extension* extension = + content::Details<const Extension>(details).ptr(); if (!extension->is_app()) return; @@ -338,7 +340,7 @@ void AppLauncherHandler::Observe(int type, } case chrome::NOTIFICATION_EXTENSION_UNLOADED: { const Extension* extension = - Details<UnloadedExtensionInfo>(details)->extension; + content::Details<UnloadedExtensionInfo>(details)->extension; if (!extension->is_app()) return; @@ -350,7 +352,7 @@ void AppLauncherHandler::Observe(int type, scoped_ptr<DictionaryValue> app_info(GetAppInfo(extension)); scoped_ptr<base::FundamentalValue> uninstall_value( Value::CreateBooleanValue( - Details<UnloadedExtensionInfo>(details)->reason == + content::Details<UnloadedExtensionInfo>(details)->reason == extension_misc::UNLOAD_REASON_UNINSTALL)); if (app_info.get()) { web_ui_->CallJavascriptFunction( @@ -372,7 +374,7 @@ void AppLauncherHandler::Observe(int type, break; } case chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR: { - CrxInstaller* crx_installer = Source<CrxInstaller>(source).ptr(); + CrxInstaller* crx_installer = content::Source<CrxInstaller>(source).ptr(); if (!Profile::FromWebUI(web_ui_)->IsSameProfile(crx_installer->profile())) return; // Fall Through. @@ -542,17 +544,17 @@ void AppLauncherHandler::HandleGetApps(const ListValue* args) { registrar_.Add(this, chrome::NOTIFICATION_APP_NOTIFICATION_STATE_CHANGED, NotificationService::AllSources()); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, - 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_LAUNCHER_REORDERED, - Source<ExtensionPrefs>(extension_service_->extension_prefs())); + content::Source<ExtensionPrefs>(extension_service_->extension_prefs())); registrar_.Add(this, chrome::NOTIFICATION_WEB_STORE_PROMO_LOADED, - Source<Profile>(profile)); + content::Source<Profile>(profile)); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR, - Source<CrxInstaller>(NULL)); + content::Source<CrxInstaller>(NULL)); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOAD_ERROR, - Source<Profile>(profile)); + content::Source<Profile>(profile)); } has_loaded_apps_ = true; diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.h b/chrome/browser/ui/webui/ntp/app_launcher_handler.h index bea5f33..4896479b 100644 --- a/chrome/browser/ui/webui/ntp/app_launcher_handler.h +++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.h @@ -15,8 +15,8 @@ #include "chrome/common/extensions/extension_constants.h" #include "content/browser/cancelable_request.h" #include "content/browser/webui/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" class AppNotification; class ExtensionPrefs; @@ -34,7 +34,7 @@ class Rect; class AppLauncherHandler : public WebUIMessageHandler, public ExtensionUninstallDialog::Delegate, public ExtensionInstallUI::Delegate, - public NotificationObserver { + public content::NotificationObserver { public: explicit AppLauncherHandler(ExtensionService* extension_service); virtual ~AppLauncherHandler(); @@ -57,10 +57,10 @@ class AppLauncherHandler : public WebUIMessageHandler, virtual WebUIMessageHandler* Attach(WebUI* web_ui) OVERRIDE; virtual void RegisterMessages() OVERRIDE; - // NotificationObserver + // content::NotificationObserver virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Populate the given dictionary with all installed app info. void FillAppDictionary(base::DictionaryValue* value); @@ -172,7 +172,7 @@ class AppLauncherHandler : public WebUIMessageHandler, // We monitor changes to the extension system so that we can reload the apps // when necessary. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Monitor extension preference changes so that the Web UI can be notified. PrefChangeRegistrar pref_change_registrar_; diff --git a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc index 4a59f00..548234ac 100644 --- a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc +++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc @@ -19,8 +19,8 @@ #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/url_constants.h" -#include "content/common/notification_details.h" #include "content/common/notification_service.h" +#include "content/public/browser/notification_details.h" namespace browser_sync { @@ -46,16 +46,17 @@ void ForeignSessionHandler::RegisterMessages() { void ForeignSessionHandler::Init() { Profile* profile = Profile::FromWebUI(web_ui()); registrar_.Add(this, chrome::NOTIFICATION_SYNC_CONFIGURE_DONE, - Source<Profile>(profile)); + content::Source<Profile>(profile)); registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED, - Source<Profile>(profile)); + content::Source<Profile>(profile)); registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_DISABLED, - Source<Profile>(profile)); + content::Source<Profile>(profile)); } -void ForeignSessionHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void ForeignSessionHandler::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { ListValue list_value; switch (type) { case chrome::NOTIFICATION_SYNC_CONFIGURE_DONE: diff --git a/chrome/browser/ui/webui/ntp/foreign_session_handler.h b/chrome/browser/ui/webui/ntp/foreign_session_handler.h index 2846eae..443a43e 100644 --- a/chrome/browser/ui/webui/ntp/foreign_session_handler.h +++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.h @@ -11,13 +11,13 @@ #include "chrome/browser/sessions/session_service.h" #include "chrome/browser/sync/glue/session_model_associator.h" #include "content/browser/webui/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" namespace browser_sync { class ForeignSessionHandler : public WebUIMessageHandler, - public NotificationObserver { + public content::NotificationObserver { public: // WebUIMessageHandler implementation. virtual void RegisterMessages(); @@ -31,8 +31,8 @@ class ForeignSessionHandler : public WebUIMessageHandler, // Determines how ForeignSessionHandler will interact with the new tab page. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Returns a pointer to the current session model associator or NULL. SessionModelAssociator* GetModelAssociator(); @@ -53,7 +53,7 @@ class ForeignSessionHandler : public WebUIMessageHandler, DictionaryValue* dictionary); // The Registrar used to register ForeignSessionHandler for notifications. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(ForeignSessionHandler); }; diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.cc b/chrome/browser/ui/webui/ntp/most_visited_handler.cc index d3513ba..b3867ce 100644 --- a/chrome/browser/ui/webui/ntp/most_visited_handler.cc +++ b/chrome/browser/ui/webui/ntp/most_visited_handler.cc @@ -32,7 +32,7 @@ #include "chrome/common/url_constants.h" #include "content/browser/browser_thread.h" #include "content/browser/user_metrics.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "googleurl/src/gurl.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -76,7 +76,7 @@ WebUIMessageHandler* MostVisitedHandler::Attach(WebUI* web_ui) { // Register for notification when TopSites changes so that we can update // ourself. registrar_.Add(this, chrome::NOTIFICATION_TOP_SITES_CHANGED, - Source<history::TopSites>(ts)); + content::Source<history::TopSites>(ts)); } // We pre-emptively make a fetch for the most visited pages so we have the @@ -322,8 +322,8 @@ void MostVisitedHandler::OnMostVisitedURLsAvailable( } void MostVisitedHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK_EQ(type, chrome::NOTIFICATION_TOP_SITES_CHANGED); // Most visited urls changed, query again. diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.h b/chrome/browser/ui/webui/ntp/most_visited_handler.h index dfef887..22543d8 100644 --- a/chrome/browser/ui/webui/ntp/most_visited_handler.h +++ b/chrome/browser/ui/webui/ntp/most_visited_handler.h @@ -12,8 +12,8 @@ #include "chrome/browser/history/history_types.h" #include "content/browser/cancelable_request.h" #include "content/browser/webui/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" class GURL; class PageUsageData; @@ -35,7 +35,7 @@ class Value; // the URL and the value is a dictionary with title, url and index. This is // owned by the PrefService. class MostVisitedHandler : public WebUIMessageHandler, - public NotificationObserver { + public content::NotificationObserver { public: MostVisitedHandler(); @@ -63,10 +63,10 @@ class MostVisitedHandler : public WebUIMessageHandler, // Callback for the "removePinnedURL" message. void HandleRemovePinnedURL(const base::ListValue* args); - // 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; const std::vector<GURL>& most_visited_urls() const { return most_visited_urls_; @@ -103,7 +103,7 @@ class MostVisitedHandler : public WebUIMessageHandler, // Sends pages_value_ to the javascript side to and resets page_value_. void SendPagesValue(); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Our consumer for the history service. CancelableRequestConsumerTSimple<PageUsageData*> cancelable_consumer_; diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc index 13309ce..300ff34 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc +++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc @@ -159,6 +159,6 @@ void NewTabPageHandler::DismissIntroMessage(PrefService* prefs) { void NewTabPageHandler::NotifyPromoResourceChanged() { NotificationService* service = NotificationService::current(); service->Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED, - Source<NewTabPageHandler>(this), + content::Source<NewTabPageHandler>(this), NotificationService::NoDetails()); } diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc index d15c154..5664e2f 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc +++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc @@ -118,7 +118,7 @@ NewTabUI::NewTabUI(TabContents* contents) // Listen for theme installation. registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>( + content::Source<ThemeService>( ThemeServiceFactory::GetForProfile(GetProfile()))); // Listen for bookmark bar visibility changes. pref_change_registrar_.Init(GetProfile()->GetPrefs()); @@ -140,8 +140,8 @@ void NewTabUI::PaintTimeout() { int load_time_ms = static_cast<int>(load_time.InMilliseconds()); NotificationService::current()->Notify( chrome::NOTIFICATION_INITIAL_NEW_TAB_UI_LOAD, - Source<Profile>(GetProfile()), - Details<int>(&load_time_ms)); + content::Source<Profile>(GetProfile()), + content::Details<int>(&load_time_ms)); UMA_HISTOGRAM_TIMES("NewTabUI load", load_time); } else { // Not enough quiet time has elapsed. @@ -156,7 +156,7 @@ void NewTabUI::StartTimingPaint(RenderViewHost* render_view_host) { start_ = base::TimeTicks::Now(); last_paint_ = start_; registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT, - Source<RenderWidgetHost>(render_view_host)); + content::Source<RenderWidgetHost>(render_view_host)); timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kTimeoutMs), this, &NewTabUI::PaintTimeout); @@ -181,8 +181,8 @@ bool NewTabUI::CanShowBookmarkBar() const { } void NewTabUI::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: { InitializeCSSCaches(); @@ -195,7 +195,8 @@ void NewTabUI::Observe(int type, break; } 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::kShowBookmarkBar) { if (!NTP4Enabled() && CanShowBookmarkBar()) { if (GetProfile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar)) diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.h b/chrome/browser/ui/webui/ntp/new_tab_ui.h index ee0b0de..58f4083 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_ui.h +++ b/chrome/browser/ui/webui/ntp/new_tab_ui.h @@ -15,8 +15,8 @@ #include "chrome/browser/sessions/tab_restore_service.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" class GURL; class PrefService; @@ -24,7 +24,7 @@ class Profile; // The TabContents used for the New Tab page. class NewTabUI : public ChromeWebUI, - public NotificationObserver { + public content::NotificationObserver { public: explicit NewTabUI(TabContents* manager); virtual ~NewTabUI(); @@ -80,8 +80,8 @@ class NewTabUI : public ChromeWebUI, FRIEND_TEST_ALL_PREFIXES(NewTabUITest, UpdateUserPrefsVersion); virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Reset the CSS caches. void InitializeCSSCaches(); @@ -97,7 +97,7 @@ class NewTabUI : public ChromeWebUI, // detached from the location bar. virtual bool CanShowBookmarkBar() const OVERRIDE; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Tracks updates of the kShowBookmarkBar preference. PrefChangeRegistrar pref_change_registrar_; diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc index 9af980e..992fd54 100644 --- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc +++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc @@ -24,7 +24,7 @@ #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "content/browser/tab_contents/tab_contents.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" @@ -52,10 +52,10 @@ void NTPLoginHandler::RegisterMessages() { } void NTPLoginHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_PREF_CHANGED); - std::string* name = Details<std::string>(details).ptr(); + std::string* name = content::Details<std::string>(details).ptr(); if (prefs::kGoogleServicesUsername == *name) UpdateLogin(); } diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.h b/chrome/browser/ui/webui/ntp/ntp_login_handler.h index a760ca7..7466d03 100644 --- a/chrome/browser/ui/webui/ntp/ntp_login_handler.h +++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.h @@ -8,7 +8,7 @@ #include "chrome/browser/prefs/pref_member.h" #include "content/browser/webui/web_ui.h" -#include "content/common/notification_observer.h" +#include "content/public/browser/notification_observer.h" class Profile; class Browser; @@ -17,7 +17,7 @@ class Browser; // username at the top of the NTP (and update itself when that changes). // In the future it may expand to allow users to login from the NTP. class NTPLoginHandler : public WebUIMessageHandler, - public NotificationObserver { + public content::NotificationObserver { public: NTPLoginHandler(); virtual ~NTPLoginHandler(); @@ -27,10 +27,10 @@ class NTPLoginHandler : public WebUIMessageHandler, // WebUIMessageHandler interface virtual void RegisterMessages() OVERRIDE; - // NotificationObserver interface + // content::NotificationObserver interface virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Returns true if the login handler should be shown in a new tab page // for the given |profile|. |profile| must not be NULL. diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc index 9f3efdb..955d50b 100644 --- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc +++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc @@ -169,7 +169,7 @@ bool InDateRange(double begin, double end) { NTPResourceCache::NTPResourceCache(Profile* profile) : profile_(profile) { registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, - Source<ThemeService>( + content::Source<ThemeService>( ThemeServiceFactory::GetForProfile(profile))); registrar_.Add(this, chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED, NotificationService::AllSources()); @@ -213,7 +213,8 @@ RefCountedMemory* NTPResourceCache::GetNewTabCSS(bool is_incognito) { } void NTPResourceCache::Observe(int type, - const NotificationSource& source, const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { // Invalidate the cache. if (chrome::NOTIFICATION_BROWSER_THEME_CHANGED == type || chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED == type) { diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.h b/chrome/browser/ui/webui/ntp/ntp_resource_cache.h index 5d50118..382e225 100644 --- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.h +++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.h @@ -12,15 +12,15 @@ #include "base/string16.h" #include "chrome/browser/prefs/pref_change_registrar.h" #include "chrome/browser/profiles/profile_keyed_service.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 Profile; class RefCountedMemory; // This class keeps a cache of NTP resources (HTML and CSS) so we don't have to // regenerate them all the time. -class NTPResourceCache : public NotificationObserver, +class NTPResourceCache : public content::NotificationObserver, public ProfileKeyedService { public: explicit NTPResourceCache(Profile* profile); @@ -29,10 +29,10 @@ class NTPResourceCache : public NotificationObserver, RefCountedMemory* GetNewTabHTML(bool is_incognito); RefCountedMemory* GetNewTabCSS(bool is_incognito); - // NotificationObserver interface. + // content::NotificationObserver interface. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; private: Profile* profile_; @@ -51,7 +51,7 @@ class NTPResourceCache : public NotificationObserver, void CreateNewTabCSS(); scoped_refptr<RefCountedMemory> new_tab_css_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; PrefChangeRegistrar pref_change_registrar_; DISALLOW_COPY_AND_ASSIGN(NTPResourceCache); diff --git a/chrome/browser/ui/webui/ntp/shown_sections_handler.cc b/chrome/browser/ui/webui/ntp/shown_sections_handler.cc index 1db6369..3b2ab06 100644 --- a/chrome/browser/ui/webui/ntp/shown_sections_handler.cc +++ b/chrome/browser/ui/webui/ntp/shown_sections_handler.cc @@ -17,7 +17,7 @@ #include "chrome/common/extensions/extension.h" #include "chrome/common/pref_names.h" #include "content/browser/user_metrics.h" -#include "content/common/notification_details.h" +#include "content/public/browser/notification_details.h" namespace { @@ -68,11 +68,12 @@ void ShownSectionsHandler::RegisterMessages() { base::Unretained(this))); } -void ShownSectionsHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void ShownSectionsHandler::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(); DCHECK(*pref_name == prefs::kNTPShownSections); int sections = pref_service_->GetInteger(prefs::kNTPShownSections); base::FundamentalValue sections_value(sections); diff --git a/chrome/browser/ui/webui/ntp/shown_sections_handler.h b/chrome/browser/ui/webui/ntp/shown_sections_handler.h index af99c1f..745cbb1 100644 --- a/chrome/browser/ui/webui/ntp/shown_sections_handler.h +++ b/chrome/browser/ui/webui/ntp/shown_sections_handler.h @@ -8,7 +8,7 @@ #include "chrome/browser/prefs/pref_change_registrar.h" #include "content/browser/webui/web_ui.h" -#include "content/common/notification_observer.h" +#include "content/public/browser/notification_observer.h" class Extension; class PrefService; @@ -37,7 +37,7 @@ enum Section { }; class ShownSectionsHandler : public WebUIMessageHandler, - public NotificationObserver { + public content::NotificationObserver { public: explicit ShownSectionsHandler(PrefService* pref_service); virtual ~ShownSectionsHandler() {} @@ -52,10 +52,10 @@ class ShownSectionsHandler : 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; // Callback for "setShownSections" message. void HandleSetShownSections(const base::ListValue* args); 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. diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc index 8b6d3d6..07d609e 100644 --- a/chrome/browser/ui/webui/plugins_ui.cc +++ b/chrome/browser/ui/webui/plugins_ui.cc @@ -91,7 +91,7 @@ ChromeWebUIDataSource* CreatePluginsUIHTMLSource() { // changes; maybe replumb plugin list through plugin service? // <http://crbug.com/39101> class PluginsDOMHandler : public WebUIMessageHandler, - public NotificationObserver { + public content::NotificationObserver { public: explicit PluginsDOMHandler(); virtual ~PluginsDOMHandler() {} @@ -112,10 +112,10 @@ class PluginsDOMHandler : public WebUIMessageHandler, // Calback for the "getShowDetails" message. void HandleGetShowDetails(const ListValue* args); - // NotificationObserver method overrides + // content::NotificationObserver method overrides virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; private: // Call this to start getting the plugins on the UI thread. @@ -124,7 +124,7 @@ class PluginsDOMHandler : public WebUIMessageHandler, // Called on the UI thread when the plugin information is ready. void PluginsLoaded(const std::vector<PluginGroup>& groups); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; base::WeakPtrFactory<PluginsDOMHandler> weak_ptr_factory_; @@ -147,7 +147,7 @@ WebUIMessageHandler* PluginsDOMHandler::Attach(WebUI* web_ui) { registrar_.Add(this, chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, - Source<Profile>(profile)); + content::Source<Profile>(profile)); return WebUIMessageHandler::Attach(web_ui); } @@ -227,8 +227,8 @@ void PluginsDOMHandler::HandleGetShowDetails(const ListValue* args) { } void PluginsDOMHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK_EQ(chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, type); LoadPlugins(); } diff --git a/chrome/browser/ui/webui/sync_promo_handler.cc b/chrome/browser/ui/webui/sync_promo_handler.cc index 1e83618..ac96784 100644 --- a/chrome/browser/ui/webui/sync_promo_handler.cc +++ b/chrome/browser/ui/webui/sync_promo_handler.cc @@ -20,8 +20,8 @@ #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_details.h" #include "content/common/notification_service.h" +#include "content/public/browser/notification_details.h" SyncPromoHandler::SyncPromoHandler(ProfileManager* profile_manager) : SyncSetupHandler(profile_manager), @@ -49,7 +49,8 @@ WebUIMessageHandler* SyncPromoHandler::Attach(WebUI* web_ui) { IsViewSourceMode()) { // Listen to see if the tab we're in gets closed. registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING, - Source<NavigationController>(&web_ui->tab_contents()->controller())); + content::Source<NavigationController>( + &web_ui->tab_contents()->controller())); // Listen to see if the window we're in gets closed. registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSING, NotificationService::AllSources()); @@ -93,8 +94,8 @@ void SyncPromoHandler::ShowConfigure(const base::DictionaryValue& args) { } void SyncPromoHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case content::NOTIFICATION_TAB_CLOSING: { if (!window_already_closed_) @@ -103,7 +104,7 @@ void SyncPromoHandler::Observe(int type, } case chrome::NOTIFICATION_BROWSER_CLOSING: { // Make sure we're in the tab strip of the closing window. - Browser* browser = Source<Browser>(source).ptr(); + Browser* browser = content::Source<Browser>(source).ptr(); if (browser->tabstrip_model()->GetWrapperIndex( web_ui_->tab_contents()) != TabStripModel::kNoTab) { RecordUserFlowAction(extension_misc::SYNC_PROMO_CLOSED_WINDOW); diff --git a/chrome/browser/ui/webui/sync_promo_handler.h b/chrome/browser/ui/webui/sync_promo_handler.h index bd1c1b1..392674c 100644 --- a/chrome/browser/ui/webui/sync_promo_handler.h +++ b/chrome/browser/ui/webui/sync_promo_handler.h @@ -8,9 +8,6 @@ #include "chrome/browser/ui/webui/sync_setup_handler.h" -class NotificationSource; -class NotificationDetails; - // The handler for Javascript messages related to the "sync promo" page. class SyncPromoHandler : public SyncSetupHandler { public: @@ -28,10 +25,10 @@ class SyncPromoHandler : public SyncSetupHandler { // SyncSetupFlowHandler implementation. virtual void ShowConfigure(const base::DictionaryValue& args) 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: virtual void ShowSetupUI() OVERRIDE; @@ -63,7 +60,7 @@ class SyncPromoHandler : public SyncSetupHandler { // Use this to register for certain notifications (currently when tabs or // windows close). - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Weak reference that's initialized and checked in Attach() (after that // guaranteed to be non-NULL). diff --git a/chrome/browser/ui/webui/task_manager_handler.cc b/chrome/browser/ui/webui/task_manager_handler.cc index 32d332e..acd8f52 100644 --- a/chrome/browser/ui/webui/task_manager_handler.cc +++ b/chrome/browser/ui/webui/task_manager_handler.cc @@ -17,7 +17,7 @@ #include "content/browser/renderer_host/render_view_host.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 "third_party/skia/include/core/SkBitmap.h" #include "webkit/glue/webpreferences.h" @@ -356,7 +356,7 @@ void TaskManagerHandler::EnableTaskManager(const ListValue* indexes) { NotificationService::current()->Notify( chrome::NOTIFICATION_TASK_MANAGER_WINDOW_READY, - Source<TaskManagerModel>(model_), + content::Source<TaskManagerModel>(model_), NotificationService::NoDetails()); } diff --git a/chrome/browser/ui/webui/web_ui_browsertest.cc b/chrome/browser/ui/webui/web_ui_browsertest.cc index 2b77fd8..dc81c8f 100644 --- a/chrome/browser/ui/webui/web_ui_browsertest.cc +++ b/chrome/browser/ui/webui/web_ui_browsertest.cc @@ -182,7 +182,7 @@ void WebUIBrowserTest::BrowsePreload(const GURL& browse_to, preload_test_name_ = preload_test_name; TestNavigationObserver navigation_observer( - Source<NavigationController>( + content::Source<NavigationController>( &browser()->GetSelectedTabContentsWrapper()->controller()), this, 1); browser::NavigateParams params( diff --git a/chrome/browser/ui/webui/web_ui_test_handler.cc b/chrome/browser/ui/webui/web_ui_test_handler.cc index 2673879..72e9999 100644 --- a/chrome/browser/ui/webui/web_ui_test_handler.cc +++ b/chrome/browser/ui/webui/web_ui_test_handler.cc @@ -12,8 +12,8 @@ #include "chrome/test/base/ui_test_utils.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_details.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_types.h" WebUITestHandler::WebUITestHandler() @@ -41,10 +41,10 @@ bool WebUITestHandler::RunJavaScriptTestWithResult(const string16& js_text) { test_succeeded_ = false; run_test_succeeded_ = false; RenderViewHost* rvh = web_ui_->tab_contents()->render_view_host(); - NotificationRegistrar notification_registrar; + content::NotificationRegistrar notification_registrar; notification_registrar.Add( this, content::NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT, - Source<RenderViewHost>(rvh)); + content::Source<RenderViewHost>(rvh)); rvh->ExecuteJavascriptInWebFrameNotifyResult(string16(), js_text); return WaitForResult(); } @@ -75,8 +75,8 @@ void WebUITestHandler::HandleTestResult(const ListValue* test_result) { } void WebUITestHandler::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { // Quit the message loop if |is_waiting_| so waiting process can get result or // error. To ensure this gets done, do this before ASSERT* calls. if (is_waiting_) @@ -90,7 +90,7 @@ void WebUITestHandler::Observe(int type, run_test_done_ = true; run_test_succeeded_ = false; - Value* value = Details<std::pair<int, Value*> >(details)->second; + Value* value = content::Details<std::pair<int, Value*> >(details)->second; ASSERT_TRUE(value->GetAsBoolean(&run_test_succeeded_)); } diff --git a/chrome/browser/ui/webui/web_ui_test_handler.h b/chrome/browser/ui/webui/web_ui_test_handler.h index f58b895..64593a6 100644 --- a/chrome/browser/ui/webui/web_ui_test_handler.h +++ b/chrome/browser/ui/webui/web_ui_test_handler.h @@ -8,7 +8,7 @@ #include "base/string16.h" #include "content/browser/webui/web_ui.h" -#include "content/common/notification_observer.h" +#include "content/public/browser/notification_observer.h" namespace base { @@ -18,7 +18,7 @@ class ListValue; // This class registers test framework specific handlers on WebUI objects. class WebUITestHandler : public WebUIMessageHandler, - public NotificationObserver { + public content::NotificationObserver { public: WebUITestHandler(); @@ -42,10 +42,10 @@ class WebUITestHandler : public WebUIMessageHandler, // Receives testResult messages. void HandleTestResult(const base::ListValue* test_result); - // From NotificationObserver. + // From content::NotificationObserver. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Runs a message loop until test finishes. Returns the result of the // test. |