diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 03:07:55 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 03:07:55 +0000 |
commit | 86ab86b73e4167c4bcf19c16bf08ca9a780fb48b (patch) | |
tree | 9154a52a53f85e739c59f43fe34a3cc7963cc06f /chrome | |
parent | fccf2fb4583e78321e5da59dfba0c8b2021f914e (diff) | |
download | chromium_src-86ab86b73e4167c4bcf19c16bf08ca9a780fb48b.zip chromium_src-86ab86b73e4167c4bcf19c16bf08ca9a780fb48b.tar.gz chromium_src-86ab86b73e4167c4bcf19c16bf08ca9a780fb48b.tar.bz2 |
Move notification_source from content/common to content/browser/public and put it into the content namespace.
BUG=98716
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106203 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
41 files changed, 306 insertions, 284 deletions
diff --git a/chrome/browser/autocomplete/history_quick_provider.cc b/chrome/browser/autocomplete/history_quick_provider.cc index 7d44257..d3f26d4 100644 --- a/chrome/browser/autocomplete/history_quick_provider.cc +++ b/chrome/browser/autocomplete/history_quick_provider.cc @@ -21,7 +21,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" #include "googleurl/src/url_parse.h" #include "googleurl/src/url_util.h" diff --git a/chrome/browser/autocomplete/keyword_provider.cc b/chrome/browser/autocomplete/keyword_provider.cc index 1ab6fb1..a88e97d 100644 --- a/chrome/browser/autocomplete/keyword_provider.cc +++ b/chrome/browser/autocomplete/keyword_provider.cc @@ -17,8 +17,8 @@ #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/common/chrome_notification_types.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 "net/base/escape.h" #include "net/base/net_util.h" @@ -66,12 +66,12 @@ KeywordProvider::KeywordProvider(ACProviderListener* listener, Profile* profile) // suggestions are meant for us. registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_OMNIBOX_SUGGESTIONS_READY, - Source<Profile>(profile->GetOriginalProfile())); + content::Source<Profile>(profile->GetOriginalProfile())); registrar_.Add( this, chrome::NOTIFICATION_EXTENSION_OMNIBOX_DEFAULT_SUGGESTION_CHANGED, - Source<Profile>(profile->GetOriginalProfile())); + content::Source<Profile>(profile->GetOriginalProfile())); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_OMNIBOX_INPUT_ENTERED, - Source<Profile>(profile)); + content::Source<Profile>(profile)); } KeywordProvider::KeywordProvider(ACProviderListener* listener, @@ -441,8 +441,8 @@ AutocompleteMatch KeywordProvider::CreateAutocompleteMatch( } void KeywordProvider::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { TemplateURLService* model = profile_ ? TemplateURLServiceFactory::GetForProfile(profile_) : model_; const AutocompleteInput& input = extension_suggest_last_input_; @@ -475,7 +475,7 @@ void KeywordProvider::Observe(int type, case chrome::NOTIFICATION_EXTENSION_OMNIBOX_SUGGESTIONS_READY: { const ExtensionOmniboxSuggestions& suggestions = - *Details<ExtensionOmniboxSuggestions>(details).ptr(); + *content::Details<ExtensionOmniboxSuggestions>(details).ptr(); if (suggestions.request_id != current_input_id_) return; // This is an old result. Just ignore. diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc index f36cae8..98543e7 100644 --- a/chrome/browser/autofill/autofill_manager.cc +++ b/chrome/browser/autofill/autofill_manager.cc @@ -44,7 +44,7 @@ #include "chrome/common/url_constants.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/common/notification_service.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "googleurl/src/gurl.h" #include "grit/generated_resources.h" #include "ipc/ipc_message_macros.h" @@ -569,7 +569,7 @@ void AutofillManager::OnShowAutofillDialog() { void AutofillManager::OnDidPreviewAutofillFormData() { NotificationService::current()->Notify( chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA, - Source<RenderViewHost>(tab_contents()->render_view_host()), + content::Source<RenderViewHost>(tab_contents()->render_view_host()), NotificationService::NoDetails()); } @@ -577,7 +577,7 @@ void AutofillManager::OnDidPreviewAutofillFormData() { void AutofillManager::OnDidFillAutofillFormData(const TimeTicks& timestamp) { NotificationService::current()->Notify( chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA, - Source<RenderViewHost>(tab_contents()->render_view_host()), + content::Source<RenderViewHost>(tab_contents()->render_view_host()), NotificationService::NoDetails()); metric_logger_->LogUserHappinessMetric(AutofillMetrics::USER_DID_AUTOFILL); @@ -593,7 +593,7 @@ void AutofillManager::OnDidFillAutofillFormData(const TimeTicks& timestamp) { void AutofillManager::OnDidShowAutofillSuggestions(bool is_new_popup) { NotificationService::current()->Notify( chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS, - Source<RenderViewHost>(tab_contents()->render_view_host()), + content::Source<RenderViewHost>(tab_contents()->render_view_host()), NotificationService::NoDetails()); if (is_new_popup) { diff --git a/chrome/browser/autofill/personal_data_manager.cc b/chrome/browser/autofill/personal_data_manager.cc index e92b929..aae657b 100644 --- a/chrome/browser/autofill/personal_data_manager.cc +++ b/chrome/browser/autofill/personal_data_manager.cc @@ -26,7 +26,7 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" #include "content/browser/browser_thread.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" namespace { @@ -207,10 +207,11 @@ void PersonalDataManager::Shutdown() { } void PersonalDataManager::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK_EQ(type, chrome::NOTIFICATION_AUTOFILL_MULTIPLE_CHANGED); - WebDataService* web_data_service = Source<WebDataService>(source).ptr(); + WebDataService* web_data_service = + content::Source<WebDataService>(source).ptr(); DCHECK(web_data_service && web_data_service == @@ -564,9 +565,10 @@ void PersonalDataManager::Init(Profile* profile) { LoadProfiles(); LoadCreditCards(); - notification_registrar_.Add(this, - chrome::NOTIFICATION_AUTOFILL_MULTIPLE_CHANGED, - Source<WebDataService>(web_data_service)); + notification_registrar_.Add( + this, + chrome::NOTIFICATION_AUTOFILL_MULTIPLE_CHANGED, + content::Source<WebDataService>(web_data_service)); } bool PersonalDataManager::IsAutofillEnabled() const { diff --git a/chrome/browser/automation/automation_browser_tracker.cc b/chrome/browser/automation/automation_browser_tracker.cc index f5a0873..8c4a6f4 100644 --- a/chrome/browser/automation/automation_browser_tracker.cc +++ b/chrome/browser/automation/automation_browser_tracker.cc @@ -5,7 +5,7 @@ #include "chrome/browser/automation/automation_browser_tracker.h" #include "chrome/common/chrome_notification_types.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" AutomationBrowserTracker::AutomationBrowserTracker( IPC::Message::Sender* automation) @@ -16,10 +16,10 @@ AutomationBrowserTracker::~AutomationBrowserTracker() {} void AutomationBrowserTracker::AddObserver(Browser* resource) { registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED, - Source<Browser>(resource)); + content::Source<Browser>(resource)); } void AutomationBrowserTracker::RemoveObserver(Browser* resource) { registrar_.Remove(this, chrome::NOTIFICATION_BROWSER_CLOSED, - Source<Browser>(resource)); + content::Source<Browser>(resource)); } diff --git a/chrome/browser/automation/automation_resource_tracker.h b/chrome/browser/automation/automation_resource_tracker.h index 1559670..b75af06 100644 --- a/chrome/browser/automation/automation_resource_tracker.h +++ b/chrome/browser/automation/automation_resource_tracker.h @@ -9,9 +9,9 @@ #include <map> #include "base/basictypes.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" #include "ipc/ipc_message.h" @@ -69,7 +69,7 @@ class AutomationResourceTrackerImpl { // close notifications. template <class T> class AutomationResourceTracker : public AutomationResourceTrackerImpl, - public NotificationObserver { + public content::NotificationObserver { public: explicit AutomationResourceTracker(IPC::Message::Sender* automation) : AutomationResourceTrackerImpl(automation) {} @@ -117,14 +117,14 @@ class AutomationResourceTracker : public AutomationResourceTrackerImpl, return GetHandleImpl(resource); } - // NotificationObserver implementation--the only thing that this tracker - // does in response to notifications is to tell the AutomationProxy + // content::NotificationObserver implementation--the only thing that this + // tracker does in response to notifications is to tell the AutomationProxy // that the associated handle is now invalid. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { - T resource = - Source<typename AutomationResourceTraits<T>::ValueType>(source).ptr(); + const content::NotificationSource& source, + const content::NotificationDetails& details) { + T resource = content::Source<typename AutomationResourceTraits<T>:: + ValueType>(source).ptr(); CloseResource(resource); } @@ -147,7 +147,7 @@ class AutomationResourceTracker : public AutomationResourceTrackerImpl, RemoveObserver(static_cast<T>(const_cast<void*>(resource))); } - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; private: DISALLOW_COPY_AND_ASSIGN(AutomationResourceTracker); diff --git a/chrome/browser/automation/automation_tab_tracker.cc b/chrome/browser/automation/automation_tab_tracker.cc index d8ed59a..03e3320 100644 --- a/chrome/browser/automation/automation_tab_tracker.cc +++ b/chrome/browser/automation/automation_tab_tracker.cc @@ -6,7 +6,7 @@ #include "content/browser/tab_contents/navigation_controller.h" #include "chrome/common/chrome_notification_types.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" AutomationTabTracker::AutomationTabTracker(IPC::Message::Sender* automation) : AutomationResourceTracker<NavigationController*>(automation) { @@ -19,38 +19,40 @@ void AutomationTabTracker::AddObserver(NavigationController* resource) { // This tab could either be a regular tab or an external tab // Register for both notifications. registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING, - Source<NavigationController>(resource)); + content::Source<NavigationController>(resource)); registrar_.Add(this, chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED, - Source<NavigationController>(resource)); + content::Source<NavigationController>(resource)); // We also want to know about navigations so we can keep track of the last // navigation time. registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, - Source<NavigationController>(resource)); + content::Source<NavigationController>(resource)); } void AutomationTabTracker::RemoveObserver(NavigationController* resource) { registrar_.Remove(this, content::NOTIFICATION_TAB_CLOSING, - Source<NavigationController>(resource)); + content::Source<NavigationController>(resource)); registrar_.Remove(this, chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED, - Source<NavigationController>(resource)); + content::Source<NavigationController>(resource)); registrar_.Remove(this, content::NOTIFICATION_LOAD_STOP, - Source<NavigationController>(resource)); + content::Source<NavigationController>(resource)); } -void AutomationTabTracker::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void AutomationTabTracker::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case content::NOTIFICATION_LOAD_STOP: - last_navigation_times_[Source<NavigationController>(source).ptr()] = - base::Time::Now(); + last_navigation_times_[ + content::Source<NavigationController>(source).ptr()] = + base::Time::Now(); return; case chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED: case content::NOTIFICATION_TAB_CLOSING: { std::map<NavigationController*, base::Time>::iterator iter = last_navigation_times_.find( - Source<NavigationController>(source).ptr()); + content::Source<NavigationController>(source).ptr()); if (iter != last_navigation_times_.end()) last_navigation_times_.erase(iter); } diff --git a/chrome/browser/background/background_application_list_model.cc b/chrome/browser/background/background_application_list_model.cc index c506fdd..6550ba2 100644 --- a/chrome/browser/background/background_application_list_model.cc +++ b/chrome/browser/background/background_application_list_model.cc @@ -19,8 +19,8 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_resource.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 "ui/base/l10n/l10n_util_collator.h" class ExtensionNameComparator { @@ -155,16 +155,16 @@ BackgroundApplicationListModel::BackgroundApplicationListModel(Profile* profile) DCHECK(profile_); 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_EXTENSIONS_READY, - Source<Profile>(profile)); + content::Source<Profile>(profile)); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PERMISSIONS_UPDATED, - Source<Profile>(profile)); + content::Source<Profile>(profile)); ExtensionService* service = profile->GetExtensionService(); if (service && service->is_ready()) Update(); @@ -254,8 +254,8 @@ bool BackgroundApplicationListModel::IsBackgroundApp( void BackgroundApplicationListModel::Observe( int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_EXTENSIONS_READY) { Update(); return; @@ -266,16 +266,18 @@ void BackgroundApplicationListModel::Observe( switch (type) { case chrome::NOTIFICATION_EXTENSION_LOADED: - OnExtensionLoaded(Details<Extension>(details).ptr()); + OnExtensionLoaded(content::Details<Extension>(details).ptr()); break; case chrome::NOTIFICATION_EXTENSION_UNLOADED: - OnExtensionUnloaded(Details<UnloadedExtensionInfo>(details)->extension); + OnExtensionUnloaded( + content::Details<UnloadedExtensionInfo>(details)->extension); break; case chrome::NOTIFICATION_EXTENSION_PERMISSIONS_UPDATED: OnExtensionPermissionsUpdated( - Details<UpdatedExtensionPermissionsInfo>(details)->extension, - Details<UpdatedExtensionPermissionsInfo>(details)->reason, - Details<UpdatedExtensionPermissionsInfo>(details)->permissions); + content::Details<UpdatedExtensionPermissionsInfo>(details)->extension, + content::Details<UpdatedExtensionPermissionsInfo>(details)->reason, + content::Details<UpdatedExtensionPermissionsInfo>(details)-> + permissions); break; default: NOTREACHED() << "Received unexpected notification"; diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/bookmarks/bookmark_html_writer.cc index 1866d4d..cd50649 100644 --- a/chrome/browser/bookmarks/bookmark_html_writer.cc +++ b/chrome/browser/bookmarks/bookmark_html_writer.cc @@ -21,7 +21,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/common/chrome_notification_types.h" #include "content/browser/browser_thread.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "grit/generated_resources.h" #include "net/base/escape.h" #include "net/base/file_stream.h" @@ -386,7 +386,7 @@ BookmarkFaviconFetcher::BookmarkFaviconFetcher( favicons_map_.reset(new URLFaviconMap()); registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED, - Source<Profile>(profile_)); + content::Source<Profile>(profile_)); } BookmarkFaviconFetcher::~BookmarkFaviconFetcher() { @@ -402,9 +402,10 @@ void BookmarkFaviconFetcher::ExportBookmarks() { ExecuteWriter(); } -void BookmarkFaviconFetcher::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void BookmarkFaviconFetcher::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (chrome::NOTIFICATION_PROFILE_DESTROYED == type && fetcher != NULL) { MessageLoop::current()->DeleteSoon(FROM_HERE, fetcher); fetcher = NULL; diff --git a/chrome/browser/bookmarks/bookmark_storage.cc b/chrome/browser/bookmarks/bookmark_storage.cc index 671fd6c..0c8ea83 100644 --- a/chrome/browser/bookmarks/bookmark_storage.cc +++ b/chrome/browser/bookmarks/bookmark_storage.cc @@ -16,7 +16,7 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_notification_types.h" #include "content/browser/browser_thread.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" using base::TimeTicks; @@ -175,7 +175,7 @@ void BookmarkStorage::MigrateFromHistory() { if (!history->BackendLoaded()) { // The backend isn't finished loading. Wait for it. notification_registrar_.Add(this, chrome::NOTIFICATION_HISTORY_LOADED, - Source<Profile>(profile_)); + content::Source<Profile>(profile_)); } else { DoLoadBookmarks(tmp_history_path_); } @@ -183,7 +183,7 @@ void BookmarkStorage::MigrateFromHistory() { void BookmarkStorage::OnHistoryFinishedWriting() { notification_registrar_.Remove(this, chrome::NOTIFICATION_HISTORY_LOADED, - Source<Profile>(profile_)); + content::Source<Profile>(profile_)); // This is used when migrating bookmarks data from database to file. // History wrote the file for us, and now we want to load data from it. @@ -240,8 +240,8 @@ void BookmarkStorage::OnLoadFinished(bool file_exists, const FilePath& path) { } void BookmarkStorage::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case chrome::NOTIFICATION_HISTORY_LOADED: OnHistoryFinishedWriting(); diff --git a/chrome/browser/chromeos/cros_settings.cc b/chrome/browser/chromeos/cros_settings.cc index ccee7af..3afc168 100644 --- a/chrome/browser/chromeos/cros_settings.cc +++ b/chrome/browser/chromeos/cros_settings.cc @@ -11,8 +11,8 @@ #include "chrome/browser/chromeos/cros_settings_provider.h" #include "chrome/browser/chromeos/user_cros_settings_provider.h" #include "chrome/common/chrome_notification_types.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 "content/public/browser/notification_types.h" namespace chromeos { @@ -38,11 +38,11 @@ void CrosSettings::FireObservers(const char* path) { return; NotificationObserverList::Iterator it(*(observer_iterator->second)); - NotificationObserver* observer; + content::NotificationObserver* observer; while ((observer = it.GetNext()) != NULL) { observer->Observe(chrome::NOTIFICATION_SYSTEM_SETTING_CHANGED, - Source<CrosSettings>(this), - Details<std::string>(&path_str)); + content::Source<CrosSettings>(this), + content::Details<std::string>(&path_str)); } } @@ -94,7 +94,7 @@ bool CrosSettings::RemoveSettingsProvider(CrosSettingsProvider* provider) { } void CrosSettings::AddSettingsObserver(const char* path, - NotificationObserver* obs) { + content::NotificationObserver* obs) { DCHECK(path); DCHECK(obs); DCHECK(CalledOnValidThread()); @@ -118,7 +118,7 @@ void CrosSettings::AddSettingsObserver(const char* path, // Verify that this observer doesn't already exist. NotificationObserverList::Iterator it(*observer_list); - NotificationObserver* existing_obs; + content::NotificationObserver* existing_obs; while ((existing_obs = it.GetNext()) != NULL) { DCHECK(existing_obs != obs) << path << " observer already registered"; if (existing_obs == obs) @@ -130,7 +130,7 @@ void CrosSettings::AddSettingsObserver(const char* path, } void CrosSettings::RemoveSettingsObserver(const char* path, - NotificationObserver* obs) { + content::NotificationObserver* obs) { DCHECK(CalledOnValidThread()); SettingsObserverMap::iterator observer_iterator = diff --git a/chrome/browser/chromeos/enterprise_extension_observer.h b/chrome/browser/chromeos/enterprise_extension_observer.h index b19bd8e..f342bed 100644 --- a/chrome/browser/chromeos/enterprise_extension_observer.h +++ b/chrome/browser/chromeos/enterprise_extension_observer.h @@ -7,10 +7,10 @@ #pragma once #include "chrome/common/extensions/extension.h" -#include "content/common/notification_details.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" class FilePath; @@ -21,21 +21,21 @@ namespace chromeos { // This observer listens for installed extensions and restarts the ChromeOS // Enterprise daemon if an Enterprise Extension gets installed. class EnterpriseExtensionObserver - : public NotificationObserver { + : public content::NotificationObserver { public: explicit EnterpriseExtensionObserver(Profile* profile); virtual ~EnterpriseExtensionObserver() {} virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: static void CheckExtensionAndNotifyEntd(const FilePath& path); static void NotifyEntd(); Profile* profile_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(EnterpriseExtensionObserver); }; diff --git a/chrome/browser/chromeos/frame/layout_mode_button.cc b/chrome/browser/chromeos/frame/layout_mode_button.cc index 8bce6b0..1707324 100644 --- a/chrome/browser/chromeos/frame/layout_mode_button.cc +++ b/chrome/browser/chromeos/frame/layout_mode_button.cc @@ -7,8 +7,8 @@ #include "base/logging.h" #include "base/utf_string_conversions.h" #include "chrome/common/chrome_notification_types.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 "grit/theme_resources.h" #include "third_party/cros_system_api/window_manager/chromeos_wm_ipc_enums.h" @@ -47,8 +47,8 @@ bool LayoutModeButton::HitTest(const gfx::Point& l) const { } void LayoutModeButton::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_LAYOUT_MODE_CHANGED); UpdateForCurrentLayoutMode(); } @@ -58,7 +58,7 @@ void LayoutModeButton::Init() { WmIpc* wm_ipc = WmIpc::instance(); registrar_.Add(this, chrome::NOTIFICATION_LAYOUT_MODE_CHANGED, - Source<WmIpc>(wm_ipc)); + content::Source<WmIpc>(wm_ipc)); #endif UpdateForCurrentLayoutMode(); } diff --git a/chrome/browser/chromeos/locale_change_guard.cc b/chrome/browser/chromeos/locale_change_guard.cc index 3e5a2d3..5c85e4e 100644 --- a/chrome/browser/chromeos/locale_change_guard.cc +++ b/chrome/browser/chromeos/locale_change_guard.cc @@ -17,7 +17,7 @@ #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/user_metrics.h" #include "content/common/notification_service.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" #include "ui/base/l10n/l10n_util.h" @@ -76,15 +76,15 @@ void LocaleChangeGuard::RevertLocaleChange(const ListValue* list) { } void LocaleChangeGuard::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (profile_ == NULL) { NOTREACHED(); return; } switch (type) { case content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME: { - if (profile_ == Source<TabContents>(source)->browser_context()) { + if (profile_ == content::Source<TabContents>(source)->browser_context()) { // We need to perform locale change check only once, so unsubscribe. registrar_.Remove(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, NotificationService::AllSources()); diff --git a/chrome/browser/chromeos/login/profile_image_downloader.cc b/chrome/browser/chromeos/login/profile_image_downloader.cc index 5426e0e..1265f16 100644 --- a/chrome/browser/chromeos/login/profile_image_downloader.cc +++ b/chrome/browser/chromeos/login/profile_image_downloader.cc @@ -18,10 +18,10 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/net/gaia/gaia_constants.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" #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 "googleurl/src/gurl.h" #include "skia/ext/image_operations.h" @@ -128,10 +128,10 @@ void ProfileImageDownloader::Start() { } else { registrar_.Add(this, chrome::NOTIFICATION_TOKEN_AVAILABLE, - Source<TokenService>(service)); + content::Source<TokenService>(service)); registrar_.Add(this, chrome::NOTIFICATION_TOKEN_REQUEST_FAILED, - Source<TokenService>(service)); + content::Source<TokenService>(service)); } } @@ -212,14 +212,15 @@ void ProfileImageDownloader::OnDecodeImageFailed(const ImageDecoder* decoder) { delegate_->OnDownloadFailure(); } -void ProfileImageDownloader::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void ProfileImageDownloader::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_TOKEN_AVAILABLE || type == chrome::NOTIFICATION_TOKEN_REQUEST_FAILED); TokenService::TokenAvailableDetails* token_details = - Details<TokenService::TokenAvailableDetails>(details).ptr(); + content::Details<TokenService::TokenAvailableDetails>(details).ptr(); if (type == chrome::NOTIFICATION_TOKEN_AVAILABLE) { if (token_details->service() == GaiaConstants::kPicasaService) { registrar_.RemoveAll(); diff --git a/chrome/browser/chromeos/login/wizard_accessibility_handler.cc b/chrome/browser/chromeos/login/wizard_accessibility_handler.cc index 3e1e16c..ae7738f 100644 --- a/chrome/browser/chromeos/login/wizard_accessibility_handler.cc +++ b/chrome/browser/chromeos/login/wizard_accessibility_handler.cc @@ -16,8 +16,8 @@ #include "chrome/browser/extensions/extension_accessibility_api_constants.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/common/chrome_notification_types.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" @@ -101,10 +101,10 @@ namespace chromeos { void WizardAccessibilityHandler::Observe( int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { const AccessibilityControlInfo *control_info = - Details<const AccessibilityControlInfo>(details).ptr(); + content::Details<const AccessibilityControlInfo>(details).ptr(); std::string description; EarconType earcon = NO_EARCON; DescribeAccessibilityEvent(type, control_info, &description, &earcon); diff --git a/chrome/browser/chromeos/login/wizard_accessibility_handler.h b/chrome/browser/chromeos/login/wizard_accessibility_handler.h index ffbdeaa..804a6de 100644 --- a/chrome/browser/chromeos/login/wizard_accessibility_handler.h +++ b/chrome/browser/chromeos/login/wizard_accessibility_handler.h @@ -9,8 +9,8 @@ #include <string> #include "base/gtest_prod_util.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" class AccessibilityControlInfo; @@ -35,15 +35,15 @@ enum EarconType { // Class that handles the accessibility notifications and generates // appropriate spoken/audio feedback. -class WizardAccessibilityHandler : public NotificationObserver { +class WizardAccessibilityHandler : public content::NotificationObserver { public: WizardAccessibilityHandler() { } private: - // Override from NotificationObserver. + // Override from content::NotificationObserver. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Get text to speak and an earcon identifier (which may be NONE) for any // accessibility event. diff --git a/chrome/browser/chromeos/media/media_player.h b/chrome/browser/chromeos/media/media_player.h index 1df1287..c7ab976 100644 --- a/chrome/browser/chromeos/media/media_player.h +++ b/chrome/browser/chromeos/media/media_player.h @@ -10,11 +10,10 @@ #include <vector> #include "base/memory/singleton.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" - #include "net/url_request/url_request.h" template <typename T> struct DefaultSingletonTraits; @@ -23,7 +22,7 @@ class Browser; class GURL; class Profile; -class MediaPlayer : public NotificationObserver, +class MediaPlayer : public content::NotificationObserver, public net::URLRequest::Interceptor { public: struct MediaUrl; @@ -97,8 +96,8 @@ class MediaPlayer : public NotificationObserver, // Used to detect when the mediaplayer is closed. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Getter for the singleton. static MediaPlayer* GetInstance(); @@ -129,7 +128,7 @@ class MediaPlayer : public NotificationObserver, Browser* mediaplayer_browser_; // Used to register for events on the windows, like to listen for closes. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // List of mimetypes that the mediaplayer should listen to. Used for // interceptions of url GETs. diff --git a/chrome/browser/chromeos/notifications/balloon_view.cc b/chrome/browser/chromeos/notifications/balloon_view.cc index d616161..3781661 100644 --- a/chrome/browser/chromeos/notifications/balloon_view.cc +++ b/chrome/browser/chromeos/notifications/balloon_view.cc @@ -20,8 +20,8 @@ #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/renderer_host/render_widget_host_view.h" #include "chrome/common/chrome_notification_types.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 "grit/theme_resources.h" #include "grit/theme_resources_standard.h" @@ -229,7 +229,7 @@ void BalloonViewImpl::Show(Balloon* balloon) { AddChildView(html_contents_->view()); notification_registrar_.Add(this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, - Source<Balloon>(balloon)); + content::Source<Balloon>(balloon)); } void BalloonViewImpl::Update() { @@ -298,11 +298,11 @@ gfx::Size BalloonViewImpl::GetPreferredSize() { } //////////////////////////////////////////////////////////////////////////////// -// NotificationObserver overrides. +// content::NotificationObserver overrides. void BalloonViewImpl::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type != chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED) { NOTREACHED(); return; @@ -312,7 +312,7 @@ void BalloonViewImpl::Observe(int type, // (e.g., because of a crash), we want to close the balloon. notification_registrar_.Remove(this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, - Source<Balloon>(balloon_)); + content::Source<Balloon>(balloon_)); Close(false); } diff --git a/chrome/browser/chromeos/notifications/notification_panel.cc b/chrome/browser/chromeos/notifications/notification_panel.cc index 1601f62..6cb1657 100644 --- a/chrome/browser/chromeos/notifications/notification_panel.cc +++ b/chrome/browser/chromeos/notifications/notification_panel.cc @@ -11,8 +11,8 @@ #include "chrome/browser/chromeos/notifications/balloon_collection_impl.h" #include "chrome/browser/chromeos/notifications/balloon_view.h" #include "chrome/common/chrome_notification_types.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 "third_party/cros_system_api/window_manager/chromeos_wm_ipc_enums.h" #include "ui/base/l10n/l10n_util.h" @@ -480,7 +480,7 @@ void NotificationPanel::Show() { gfx::Rect(0, 0, kBalloonMinWidth, 1), 0, WM_IPC_PANEL_USER_RESIZE_VERTICALLY); registrar_.Add(this, chrome::NOTIFICATION_PANEL_STATE_CHANGED, - Source<PanelController>(panel_controller_.get())); + content::Source<PanelController>(panel_controller_.get())); } panel_widget_->Show(); } @@ -630,11 +630,11 @@ void NotificationPanel::ActivatePanel() { } //////////////////////////////////////////////////////////////////////////////// -// NotificationObserver overrides. +// content::NotificationObserver overrides. void NotificationPanel::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_PANEL_STATE_CHANGED); PanelController::State* state = reinterpret_cast<PanelController::State*>(details.map_key()); @@ -706,9 +706,11 @@ void NotificationPanel::Init() { } void NotificationPanel::UnregisterNotification() { - if (panel_controller_.get()) - registrar_.Remove(this, chrome::NOTIFICATION_PANEL_STATE_CHANGED, - Source<PanelController>(panel_controller_.get())); + if (panel_controller_.get()) { + registrar_.Remove( + this, chrome::NOTIFICATION_PANEL_STATE_CHANGED, + content::Source<PanelController>(panel_controller_.get())); + } } void NotificationPanel::ScrollBalloonToVisible(Balloon* balloon) { diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc index da52e95..3d07a4e 100644 --- a/chrome/browser/chromeos/preferences.cc +++ b/chrome/browser/chromeos/preferences.cc @@ -25,8 +25,8 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.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 "unicode/timezone.h" namespace chromeos { @@ -291,8 +291,8 @@ void Preferences::Init(PrefService* prefs) { } void Preferences::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()); } diff --git a/chrome/browser/chromeos/status/clock_menu_button.cc b/chrome/browser/chromeos/status/clock_menu_button.cc index 6921a1a..1d42aa0 100644 --- a/chrome/browser/chromeos/status/clock_menu_button.cc +++ b/chrome/browser/chromeos/status/clock_menu_button.cc @@ -14,8 +14,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" #include "ui/gfx/canvas.h" @@ -108,13 +108,13 @@ void ClockMenuButton::SetDefaultUse24HourClock(bool use_24hour_clock) { UpdateText(); } -// ClockMenuButton, NotificationObserver implementation: +// ClockMenuButton, content::NotificationObserver implementation: void ClockMenuButton::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::kUse24HourClock) { UpdateText(); } diff --git a/chrome/browser/chromeos/tab_first_render_watcher.cc b/chrome/browser/chromeos/tab_first_render_watcher.cc index 3f041c5..62c9045 100644 --- a/chrome/browser/chromeos/tab_first_render_watcher.cc +++ b/chrome/browser/chromeos/tab_first_render_watcher.cc @@ -6,8 +6,8 @@ #include "content/browser/renderer_host/render_widget_host.h" #include "content/browser/renderer_host/render_view_host.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 "content/public/browser/notification_types.h" namespace chromeos { @@ -19,20 +19,21 @@ TabFirstRenderWatcher::TabFirstRenderWatcher(TabContents* tab, delegate_(delegate) { registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB, - Source<TabContents>(tab_contents_)); + content::Source<TabContents>(tab_contents_)); registrar_.Add(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, - Source<TabContents>(tab_contents_)); + content::Source<TabContents>(tab_contents_)); } void TabFirstRenderWatcher::Observe(int type, - const NotificationSource& source, const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB: { - RenderWidgetHost* rwh = Details<RenderWidgetHost>(details).ptr(); + RenderWidgetHost* rwh = content::Details<RenderWidgetHost>(details).ptr(); registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT, - Source<RenderWidgetHost>(rwh)); + content::Source<RenderWidgetHost>(rwh)); delegate_->OnRenderHostCreated(Details<RenderViewHost>(details).ptr()); break; } diff --git a/chrome/browser/content_settings/content_settings_default_provider.cc b/chrome/browser/content_settings/content_settings_default_provider.cc index 40c9a26..0bc7eac 100644 --- a/chrome/browser/content_settings/content_settings_default_provider.cc +++ b/chrome/browser/content_settings/content_settings_default_provider.cc @@ -21,7 +21,7 @@ #include "content/browser/browser_thread.h" #include "content/browser/user_metrics.h" #include "content/common/notification_service.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "googleurl/src/gurl.h" namespace { @@ -214,16 +214,16 @@ void DefaultProvider::ShutdownOnUIThread() { } void DefaultProvider::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); if (type == chrome::NOTIFICATION_PREF_CHANGED) { - DCHECK_EQ(prefs_, Source<PrefService>(source).ptr()); + DCHECK_EQ(prefs_, content::Source<PrefService>(source).ptr()); if (updating_preferences_) return; - std::string* name = Details<std::string>(details).ptr(); + std::string* name = content::Details<std::string>(details).ptr(); if (*name == prefs::kDefaultContentSettings) { ReadDefaultSettings(true); } else if (*name == prefs::kGeolocationDefaultContentSetting) { diff --git a/chrome/browser/content_settings/content_settings_policy_provider.cc b/chrome/browser/content_settings/content_settings_policy_provider.cc index 820575e..d357ab3 100644 --- a/chrome/browser/content_settings/content_settings_policy_provider.cc +++ b/chrome/browser/content_settings/content_settings_policy_provider.cc @@ -17,7 +17,7 @@ #include "chrome/common/pref_names.h" #include "content/browser/browser_thread.h" #include "content/common/notification_service.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" namespace { @@ -404,13 +404,13 @@ void PolicyProvider::ShutdownOnUIThread() { } void PolicyProvider::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); if (type == chrome::NOTIFICATION_PREF_CHANGED) { - DCHECK_EQ(prefs_, Source<PrefService>(source).ptr()); - std::string* name = Details<std::string>(details).ptr(); + DCHECK_EQ(prefs_, content::Source<PrefService>(source).ptr()); + std::string* name = content::Details<std::string>(details).ptr(); if (*name == prefs::kManagedDefaultCookiesSetting) { UpdateManagedDefaultSetting(CONTENT_SETTINGS_TYPE_COOKIES); } else if (*name == prefs::kManagedDefaultImagesSetting) { diff --git a/chrome/browser/content_settings/content_settings_pref_provider.cc b/chrome/browser/content_settings/content_settings_pref_provider.cc index 877a46c..9c825e7 100644 --- a/chrome/browser/content_settings/content_settings_pref_provider.cc +++ b/chrome/browser/content_settings/content_settings_pref_provider.cc @@ -24,7 +24,7 @@ #include "content/browser/browser_thread.h" #include "content/browser/user_metrics.h" #include "content/common/notification_service.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "googleurl/src/gurl.h" namespace { @@ -233,18 +233,18 @@ void PrefProvider::ClearAllContentSettingsRules( void PrefProvider::Observe( int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); if (type == chrome::NOTIFICATION_PREF_CHANGED) { - DCHECK_EQ(prefs_, Source<PrefService>(source).ptr()); + DCHECK_EQ(prefs_, content::Source<PrefService>(source).ptr()); if (updating_preferences_) return; if (!is_incognito_) { AutoReset<bool> auto_reset(&updating_preferences_, true); - std::string* name = Details<std::string>(details).ptr(); + std::string* name = content::Details<std::string>(details).ptr(); if (*name == prefs::kContentSettingsPatternPairs) { SyncObsoletePatternPref(); SyncObsoletePrefs(); diff --git a/chrome/browser/content_settings/host_content_settings_map.cc b/chrome/browser/content_settings/host_content_settings_map.cc index bd92ce5..b8b8af7 100644 --- a/chrome/browser/content_settings/host_content_settings_map.cc +++ b/chrome/browser/content_settings/host_content_settings_map.cc @@ -29,7 +29,7 @@ #include "content/browser/browser_thread.h" #include "content/browser/user_metrics.h" #include "content/common/notification_service.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "content/public/common/content_switches.h" #include "googleurl/src/gurl.h" #include "net/base/net_errors.h" @@ -492,21 +492,22 @@ void HostContentSettingsMap::OnContentSettingChanged( resource_identifier); NotificationService::current()->Notify( chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED, - Source<HostContentSettingsMap>(this), - Details<const ContentSettingsDetails>(&details)); + content::Source<HostContentSettingsMap>(this), + content::Details<const ContentSettingsDetails>(&details)); } -void HostContentSettingsMap::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void HostContentSettingsMap::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); if (type == chrome::NOTIFICATION_PREF_CHANGED) { - DCHECK_EQ(prefs_, Source<PrefService>(source).ptr()); + DCHECK_EQ(prefs_, content::Source<PrefService>(source).ptr()); if (updating_preferences_) return; - std::string* name = Details<std::string>(details).ptr(); + std::string* name = content::Details<std::string>(details).ptr(); if (*name == prefs::kBlockThirdPartyCookies) { base::AutoLock auto_lock(lock_); block_third_party_cookies_ = prefs_->GetBoolean( diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc index 4c06ccc..d524121 100644 --- a/chrome/browser/download/chrome_download_manager_delegate.cc +++ b/chrome/browser/download/chrome_download_manager_delegate.cc @@ -36,7 +36,7 @@ #include "content/browser/download/download_manager.h" #include "content/browser/download/download_status_updater.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" @@ -167,7 +167,7 @@ bool ChromeDownloadManagerDelegate::ShouldCompleteDownload(DownloadItem* item) { // not around when CRX_INSTALLER_DONE fires, Complete() will not be called. registrar_.Add(this, chrome::NOTIFICATION_CRX_INSTALLER_DONE, - Source<CrxInstaller>(crx_installer.get())); + content::Source<CrxInstaller>(crx_installer.get())); crx_installers_[crx_installer.get()] = item->id(); // The status text and percent complete indicator will change now @@ -305,18 +305,18 @@ void ChromeDownloadManagerDelegate::CheckDownloadUrlDone( base::Unretained(this))); } -// NotificationObserver implementation. +// content::NotificationObserver implementation. void ChromeDownloadManagerDelegate::Observe( int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_CRX_INSTALLER_DONE); registrar_.Remove(this, chrome::NOTIFICATION_CRX_INSTALLER_DONE, source); - CrxInstaller* installer = Source<CrxInstaller>(source).ptr(); + CrxInstaller* installer = content::Source<CrxInstaller>(source).ptr(); int download_id = crx_installers_[installer]; crx_installers_.erase(installer); diff --git a/chrome/browser/download/download_request_limiter.cc b/chrome/browser/download/download_request_limiter.cc index cf29e87..bf64eb1 100644 --- a/chrome/browser/download/download_request_limiter.cc +++ b/chrome/browser/download/download_request_limiter.cc @@ -17,7 +17,7 @@ #include "content/browser/tab_contents/tab_contents_delegate.h" #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" // TabDownloadState ------------------------------------------------------------ @@ -31,7 +31,7 @@ DownloadRequestLimiter::TabDownloadState::TabDownloadState( status_(DownloadRequestLimiter::ALLOW_ONE_DOWNLOAD), download_count_(0), infobar_(NULL) { - Source<NavigationController> notification_source(controller); + content::Source<NavigationController> notification_source(controller); registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING, notification_source); registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED, notification_source); @@ -94,11 +94,11 @@ void DownloadRequestLimiter::TabDownloadState::Accept() { void DownloadRequestLimiter::TabDownloadState::Observe( int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if ((type != content::NOTIFICATION_NAV_ENTRY_PENDING && type != content::NOTIFICATION_TAB_CLOSED) || - Source<NavigationController>(source).ptr() != controller_) { + content::Source<NavigationController>(source).ptr() != controller_) { NOTREACHED(); return; } diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc index e7bfbb7..7f7ba77 100644 --- a/chrome/browser/extensions/app_process_apitest.cc +++ b/chrome/browser/extensions/app_process_apitest.cc @@ -393,7 +393,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, OpenAppFromIframe) { // NAV_ENTRY_COMMITTED on the new tab there. ui_test_utils::WindowedNotificationObserver observer( content::NOTIFICATION_NAV_ENTRY_COMMITTED, - Source<NavigationController>(&(newtab->controller()))); + content::Source<NavigationController>(&(newtab->controller()))); observer.Wait(); } diff --git a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc index ef5894b..1c851cd 100644 --- a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc +++ b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc @@ -18,9 +18,9 @@ #include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/extensions/extension_resource.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_details.h" -#include "content/common/notification_registrar.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_registrar.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" @@ -84,7 +84,7 @@ void ExtensionDisabledDialogDelegate::InstallUIAbort(bool user_initiated) { // ExtensionDisabledInfobarDelegate ------------------------------------------- class ExtensionDisabledInfobarDelegate : public ConfirmInfoBarDelegate, - public NotificationObserver { + public content::NotificationObserver { public: ExtensionDisabledInfobarDelegate(InfoBarTabHelper* infobar_helper, ExtensionService* service, @@ -99,12 +99,12 @@ class ExtensionDisabledInfobarDelegate : public ConfirmInfoBarDelegate, virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; virtual bool Accept() 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; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; ExtensionService* service_; const Extension* extension_; }; @@ -118,9 +118,9 @@ ExtensionDisabledInfobarDelegate::ExtensionDisabledInfobarDelegate( extension_(extension) { // The user might re-enable the extension in other ways, so watch for that. registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, - Source<Profile>(service->profile())); + content::Source<Profile>(service->profile())); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, - Source<Profile>(service->profile())); + content::Source<Profile>(service->profile())); } ExtensionDisabledInfobarDelegate::~ExtensionDisabledInfobarDelegate() { @@ -152,16 +152,17 @@ bool ExtensionDisabledInfobarDelegate::Accept() { void ExtensionDisabledInfobarDelegate::Observe( int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { // TODO(mpcomplete): RemoveInfoBar doesn't seem to always result in us getting // deleted. const Extension* extension = NULL; if (type == chrome::NOTIFICATION_EXTENSION_LOADED) { - extension = Details<const Extension>(details).ptr(); + extension = content::Details<const Extension>(details).ptr(); } else { DCHECK_EQ(chrome::NOTIFICATION_EXTENSION_UNLOADED, type); - UnloadedExtensionInfo* info = Details<UnloadedExtensionInfo>(details).ptr(); + UnloadedExtensionInfo* info = + content::Details<UnloadedExtensionInfo>(details).ptr(); if (info->reason == extension_misc::UNLOAD_REASON_DISABLE || info->reason == extension_misc::UNLOAD_REASON_UNINSTALL) extension = info->extension; diff --git a/chrome/browser/extensions/extension_function.cc b/chrome/browser/extensions/extension_function.cc index 81e2851..64a901c 100644 --- a/chrome/browser/extensions/extension_function.cc +++ b/chrome/browser/extensions/extension_function.cc @@ -14,8 +14,8 @@ #include "content/browser/renderer_host/render_process_host.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/user_metrics.h" -#include "content/common/notification_source.h" #include "content/common/result_codes.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" // static @@ -28,15 +28,15 @@ UIThreadExtensionFunction::RenderViewHostTracker::RenderViewHostTracker( : function_(function) { registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_DELETED, - Source<RenderViewHost>(function->render_view_host())); + content::Source<RenderViewHost>(function->render_view_host())); } void UIThreadExtensionFunction::RenderViewHostTracker::Observe( int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { CHECK(type == content::NOTIFICATION_RENDER_VIEW_HOST_DELETED); - CHECK(Source<RenderViewHost>(source).ptr() == + CHECK(content::Source<RenderViewHost>(source).ptr() == function_->render_view_host()); function_->SetRenderViewHost(NULL); } diff --git a/chrome/browser/extensions/extension_infobar_delegate.cc b/chrome/browser/extensions/extension_infobar_delegate.cc index 273589c..b1922dbc 100644 --- a/chrome/browser/extensions/extension_infobar_delegate.cc +++ b/chrome/browser/extensions/extension_infobar_delegate.cc @@ -12,8 +12,8 @@ #include "chrome/browser/ui/browser.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/extensions/extension.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" ExtensionInfoBarDelegate::ExtensionInfoBarDelegate( Browser* browser, @@ -32,9 +32,9 @@ ExtensionInfoBarDelegate::ExtensionInfoBarDelegate( extension_host_->set_associated_tab_contents(infobar_helper->tab_contents()); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE, - Source<Profile>(browser->profile())); + content::Source<Profile>(browser->profile())); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, - Source<Profile>(browser->profile())); + content::Source<Profile>(browser->profile())); #if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK) int default_height = InfoBar::kDefaultBarTargetHeight; @@ -83,15 +83,18 @@ ExtensionInfoBarDelegate* return this; } -void ExtensionInfoBarDelegate::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void ExtensionInfoBarDelegate::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE) { - if (extension_host_.get() == Details<ExtensionHost>(details).ptr()) + if (extension_host_.get() == content::Details<ExtensionHost>(details).ptr()) RemoveSelf(); } else { DCHECK(type == chrome::NOTIFICATION_EXTENSION_UNLOADED); - if (extension_ == Details<UnloadedExtensionInfo>(details)->extension) + if (extension_ == + content::Details<UnloadedExtensionInfo>(details)->extension) { RemoveSelf(); + } } } diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc index 716d6f5..29f7733 100644 --- a/chrome/browser/extensions/extension_updater.cc +++ b/chrome/browser/extensions/extension_updater.cc @@ -38,7 +38,7 @@ #include "chrome/common/pref_names.h" #include "content/browser/utility_process_host.h" #include "content/common/notification_service.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "crypto/sha2.h" #include "googleurl/src/gurl.h" #include "net/base/escape.h" @@ -902,7 +902,7 @@ bool ExtensionUpdater::MaybeInstallCRXFile() { // the installer we started. registrar_.Add(this, chrome::NOTIFICATION_CRX_INSTALLER_DONE, - Source<CrxInstaller>(installer)); + content::Source<CrxInstaller>(installer)); } in_progress_ids_.erase(crx_file.id); fetched_crx_files_.pop(); @@ -913,8 +913,8 @@ bool ExtensionUpdater::MaybeInstallCRXFile() { } void ExtensionUpdater::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_CRX_INSTALLER_DONE); // No need to listen for CRX_INSTALLER_DONE anymore. @@ -1218,22 +1218,22 @@ void ExtensionUpdater::FetchUpdatedExtension(const std::string& id, void ExtensionUpdater::NotifyStarted() { NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_UPDATING_STARTED, - Source<Profile>(profile_), + content::Source<Profile>(profile_), NotificationService::NoDetails()); } void ExtensionUpdater::NotifyUpdateFound(const std::string& extension_id) { NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_UPDATE_FOUND, - Source<Profile>(profile_), - Details<const std::string>(&extension_id)); + content::Source<Profile>(profile_), + content::Details<const std::string>(&extension_id)); } void ExtensionUpdater::NotifyIfFinished() { if (in_progress_ids_.empty()) { NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_UPDATING_FINISHED, - Source<Profile>(profile_), + content::Source<Profile>(profile_), NotificationService::NoDetails()); VLOG(1) << "Sending EXTENSION_UPDATING_FINISHED"; } diff --git a/chrome/browser/extensions/extension_webstore_private_api.cc b/chrome/browser/extensions/extension_webstore_private_api.cc index 74039b3..52d2d9a 100644 --- a/chrome/browser/extensions/extension_webstore_private_api.cc +++ b/chrome/browser/extensions/extension_webstore_private_api.cc @@ -26,8 +26,8 @@ #include "chrome/common/extensions/extension_l10n_util.h" #include "chrome/common/net/gaia/gaia_constants.h" #include "content/browser/tab_contents/tab_contents.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" diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc index 9396b56..7131cbf 100644 --- a/chrome/browser/extensions/webstore_installer.cc +++ b/chrome/browser/extensions/webstore_installer.cc @@ -15,8 +15,8 @@ #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" #include "content/browser/tab_contents/navigation_controller.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 "googleurl/src/gurl.h" #include "net/base/escape.h" @@ -52,9 +52,9 @@ GURL GetWebstoreInstallUrl( WebstoreInstaller::WebstoreInstaller(Profile* profile) : profile_(profile) { registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED, - Source<Profile>(profile)); + content::Source<Profile>(profile)); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR, - Source<CrxInstaller>(NULL)); + content::Source<CrxInstaller>(NULL)); } WebstoreInstaller::~WebstoreInstaller() {} @@ -117,25 +117,27 @@ void WebstoreInstaller::InstallExtension( } void WebstoreInstaller::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case chrome::NOTIFICATION_EXTENSION_INSTALLED: { - CHECK(profile_->IsSameProfile(Source<Profile>(source).ptr())); - const Extension* extension = Details<const Extension>(details).ptr(); + CHECK(profile_->IsSameProfile(content::Source<Profile>(source).ptr())); + const Extension* extension = + content::Details<const Extension>(details).ptr(); ReportSuccess(extension->id()); break; } case chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR: { - CrxInstaller* crx_installer = Source<CrxInstaller>(source).ptr(); + CrxInstaller* crx_installer = content::Source<CrxInstaller>(source).ptr(); CHECK(crx_installer); if (!profile_->IsSameProfile(crx_installer->profile())) return; std::string id = GetPendingInstallId( crx_installer->original_download_url()); - const std::string* error = Details<const std::string>(details).ptr(); + const std::string* error = + content::Details<const std::string>(details).ptr(); if (!id.empty()) ReportFailure(id, *error); break; diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc index a685bf8..a9c98d2 100644 --- a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc +++ b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc @@ -26,8 +26,8 @@ #include "content/browser/geolocation/geolocation_provider.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_registrar.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_registrar.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" @@ -47,7 +47,7 @@ // things listening for such notifications. // For the time being this class is self-contained and it doesn't seem pulling // the notification infrastructure would simplify. -class GeolocationInfoBarQueueController : NotificationObserver { +class GeolocationInfoBarQueueController : content::NotificationObserver { public: GeolocationInfoBarQueueController( ChromeGeolocationPermissionContext* geolocation_permission_context, @@ -83,10 +83,10 @@ class GeolocationInfoBarQueueController : NotificationObserver { const GURL& embedder, bool allowed); - // NotificationObserver + // content::NotificationObserver virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: struct PendingInfoBarRequest; @@ -101,7 +101,7 @@ class GeolocationInfoBarQueueController : NotificationObserver { PendingInfoBarRequests::iterator CancelInfoBarRequestInternal( PendingInfoBarRequests::iterator i); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; ChromeGeolocationPermissionContext* const geolocation_permission_context_; Profile* const profile_; @@ -424,11 +424,11 @@ void GeolocationInfoBarQueueController::OnPermissionSet( } void GeolocationInfoBarQueueController::Observe( - int type, const NotificationSource& source, - const NotificationDetails& details) { + int type, const content::NotificationSource& source, + const content::NotificationDetails& details) { registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, source); - TabContents* tab_contents = Source<TabContents>(source).ptr(); + TabContents* tab_contents = content::Source<TabContents>(source).ptr(); for (PendingInfoBarRequests::iterator i = pending_infobar_requests_.begin(); i != pending_infobar_requests_.end();) { if (i->infobar_delegate == NULL && @@ -459,9 +459,9 @@ void GeolocationInfoBarQueueController::ShowQueuedInfoBar(int render_process_id, if (!i->infobar_delegate) { if (!registrar_.IsRegistered( this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, - Source<TabContents>(tab_contents))) { + content::Source<TabContents>(tab_contents))) { registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, - Source<TabContents>(tab_contents)); + content::Source<TabContents>(tab_contents)); } i->infobar_delegate = new GeolocationConfirmInfoBarDelegate( wrapper->infobar_tab_helper(), this, render_process_id, diff --git a/chrome/browser/history/in_memory_history_backend.cc b/chrome/browser/history/in_memory_history_backend.cc index 6652b1a..f1e1730 100644 --- a/chrome/browser/history/in_memory_history_backend.cc +++ b/chrome/browser/history/in_memory_history_backend.cc @@ -18,8 +18,8 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.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 history { @@ -62,7 +62,7 @@ void InMemoryHistoryBackend::AttachToHistoryService(Profile* profile) { // Register for the notifications we care about. // We only want notifications for the associated profile. - Source<Profile> source(profile_); + content::Source<Profile> source(profile_); registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URL_VISITED, source); registrar_.Add(this, chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED, source); @@ -73,12 +73,13 @@ void InMemoryHistoryBackend::AttachToHistoryService(Profile* profile) { registrar_.Add(this, chrome::NOTIFICATION_TEMPLATE_URL_REMOVED, source); } -void InMemoryHistoryBackend::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void InMemoryHistoryBackend::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case chrome::NOTIFICATION_HISTORY_URL_VISITED: { - Details<history::URLVisitedDetails> visited_details(details); + content::Details<history::URLVisitedDetails> visited_details(details); content::PageTransition primary_type = content::PageTransitionStripQualifier(visited_details->transition); if (visited_details->row.typed_count() > 0 || @@ -92,18 +93,19 @@ void InMemoryHistoryBackend::Observe(int type, } case chrome::NOTIFICATION_HISTORY_KEYWORD_SEARCH_TERM_UPDATED: OnKeywordSearchTermUpdated( - *Details<history::KeywordSearchTermDetails>(details).ptr()); + *content::Details<history::KeywordSearchTermDetails>(details).ptr()); break; case chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED: OnTypedURLsModified( - *Details<history::URLsModifiedDetails>(details).ptr()); + *content::Details<history::URLsModifiedDetails>(details).ptr()); break; case chrome::NOTIFICATION_HISTORY_URLS_DELETED: - OnURLsDeleted(*Details<history::URLsDeletedDetails>(details).ptr()); + OnURLsDeleted( + *content::Details<history::URLsDeletedDetails>(details).ptr()); break; case chrome::NOTIFICATION_TEMPLATE_URL_REMOVED: db_->DeleteAllSearchTermsForKeyword( - *(Details<TemplateURLID>(details).ptr())); + *(content::Details<TemplateURLID>(details).ptr())); break; default: // For simplicity, the unit tests send us all notifications, even when diff --git a/chrome/browser/history/shortcuts_backend.cc b/chrome/browser/history/shortcuts_backend.cc index 7972770..c07ab8e 100644 --- a/chrome/browser/history/shortcuts_backend.cc +++ b/chrome/browser/history/shortcuts_backend.cc @@ -22,8 +22,8 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/guid.h" #include "content/browser/browser_thread.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 history { @@ -35,9 +35,9 @@ ShortcutsBackend::ShortcutsBackend(const FilePath& db_folder_path, // |profile| can be NULL in tests. if (profile) { notification_registrar_.Add(this, chrome::NOTIFICATION_OMNIBOX_OPENED_URL, - Source<Profile>(profile)); + content::Source<Profile>(profile)); notification_registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED, - Source<Profile>(profile)); + content::Source<Profile>(profile)); } } @@ -182,17 +182,19 @@ void ShortcutsBackend::InitCompleted() { OnShortcutsLoaded()); } -// NotificationObserver: +// content::NotificationObserver: void ShortcutsBackend::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (current_state_ != INITIALIZED) return; if (type == chrome::NOTIFICATION_HISTORY_URLS_DELETED) { - if (Details<const history::URLsDeletedDetails>(details)->all_history) + if (content::Details<const history::URLsDeletedDetails>(details)-> + all_history) { DeleteAllShortcuts(); + } const std::set<GURL>& urls = - Details<const history::URLsDeletedDetails>(details)->urls; + content::Details<const history::URLsDeletedDetails>(details)->urls; std::vector<std::string> shortcut_ids; for (shortcuts_provider::GuidToShortcutsIteratorMap::iterator @@ -207,7 +209,7 @@ void ShortcutsBackend::Observe(int type, DCHECK(type == chrome::NOTIFICATION_OMNIBOX_OPENED_URL); - AutocompleteLog* log = Details<AutocompleteLog>(details).ptr(); + AutocompleteLog* log = content::Details<AutocompleteLog>(details).ptr(); string16 text_lowercase(base::i18n::ToLower(log->text)); int number_of_hits = 1; diff --git a/chrome/browser/importer/importer_host.cc b/chrome/browser/importer/importer_host.cc index 89f4670..d331a30 100644 --- a/chrome/browser/importer/importer_host.cc +++ b/chrome/browser/importer/importer_host.cc @@ -24,7 +24,7 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" #include "content/browser/browser_thread.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" @@ -231,7 +231,7 @@ void ImporterHost::CheckForLoadedModels(uint16 items) { TemplateURLService* model = TemplateURLServiceFactory::GetForProfile(profile_); registrar_.Add(this, chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED, - Source<TemplateURLService>(model)); + content::Source<TemplateURLService>(model)); model->Load(); } } @@ -261,8 +261,8 @@ void ImporterHost::BookmarkModelChanged() { } void ImporterHost::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED); registrar_.RemoveAll(); InvokeTaskIfDone(); diff --git a/chrome/browser/infobars/infobar_container.cc b/chrome/browser/infobars/infobar_container.cc index c3e74a6..e00532c 100644 --- a/chrome/browser/infobars/infobar_container.cc +++ b/chrome/browser/infobars/infobar_container.cc @@ -15,8 +15,8 @@ #include "chrome/browser/infobars/infobar_delegate.h" #include "chrome/browser/infobars/infobar_tab_helper.h" #include "chrome/common/chrome_notification_types.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 "ui/base/animation/slide_animation.h" InfoBarContainer::Delegate::~Delegate() { @@ -45,7 +45,7 @@ void InfoBarContainer::ChangeTabContents(InfoBarTabHelper* tab_helper) { tab_helper_ = tab_helper; if (tab_helper_) { - Source<InfoBarTabHelper> th_source(tab_helper_); + content::Source<InfoBarTabHelper> th_source(tab_helper_); registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, th_source); registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, @@ -124,25 +124,26 @@ void InfoBarContainer::RemoveAllInfoBarsForDestruction() { } void InfoBarContainer::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED: AddInfoBar( - Details<InfoBarAddedDetails>(details)->CreateInfoBar(tab_helper_), + content::Details<InfoBarAddedDetails>(details)->CreateInfoBar( + tab_helper_), infobars_.size(), true, WANT_CALLBACK); break; case chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED: { InfoBarRemovedDetails* removed_details = - Details<InfoBarRemovedDetails>(details).ptr(); + content::Details<InfoBarRemovedDetails>(details).ptr(); HideInfoBar(removed_details->first, removed_details->second); break; } case chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REPLACED: { InfoBarReplacedDetails* replaced_details = - Details<InfoBarReplacedDetails>(details).ptr(); + content::Details<InfoBarReplacedDetails>(details).ptr(); AddInfoBar(replaced_details->second->CreateInfoBar(tab_helper_), HideInfoBar(replaced_details->first, false), false, WANT_CALLBACK); break; |