From 6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Wed, 19 Oct 2011 02:52:53 +0000 Subject: Move NotificationObserver, NotificationSource, and NotificationDetails to content/public/browser. This patch got way bigger than I wanted, but once I moved NotificationDetails, I figured I might as well mvoe the others since they're in the same files. In hindsight, I should have converted a subset of files at a time by leaving a using statement in the header. BUG=98716 TBR=joi git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106196 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/extensions/user_script_master.cc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'chrome/browser/extensions/user_script_master.cc') diff --git a/chrome/browser/extensions/user_script_master.cc b/chrome/browser/extensions/user_script_master.cc index 6caeccf..f3c5be1 100644 --- a/chrome/browser/extensions/user_script_master.cc +++ b/chrome/browser/extensions/user_script_master.cc @@ -289,11 +289,11 @@ UserScriptMaster::UserScriptMaster(Profile* profile) pending_load_(false), profile_(profile) { registrar_.Add(this, chrome::NOTIFICATION_EXTENSIONS_READY, - Source(profile_)); + content::Source(profile_)); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, - Source(profile_)); + content::Source(profile_)); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, - Source(profile_)); + content::Source(profile_)); registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED, NotificationService::AllBrowserContextsAndSources()); } @@ -325,14 +325,14 @@ void UserScriptMaster::NewScriptsAvailable(base::SharedMemory* handle) { NotificationService::current()->Notify( chrome::NOTIFICATION_USER_SCRIPTS_UPDATED, - Source(profile_), - Details(handle)); + content::Source(profile_), + content::Details(handle)); } } void UserScriptMaster::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { bool should_start_load = false; switch (type) { case chrome::NOTIFICATION_EXTENSIONS_READY: @@ -341,7 +341,8 @@ void UserScriptMaster::Observe(int type, break; case chrome::NOTIFICATION_EXTENSION_LOADED: { // Add any content scripts inside the extension. - const Extension* extension = Details(details).ptr(); + const Extension* extension = + content::Details(details).ptr(); extensions_info_[extension->id()] = ExtensionSet::ExtensionPathAndDefaultLocale( extension->path(), extension->default_locale()); @@ -360,7 +361,7 @@ void UserScriptMaster::Observe(int type, case chrome::NOTIFICATION_EXTENSION_UNLOADED: { // Remove any content scripts. const Extension* extension = - Details(details)->extension; + content::Details(details)->extension; extensions_info_.erase(extension->id()); UserScriptList new_user_scripts; for (UserScriptList::iterator iter = user_scripts_.begin(); @@ -377,7 +378,8 @@ void UserScriptMaster::Observe(int type, break; } case content::NOTIFICATION_RENDERER_PROCESS_CREATED: { - RenderProcessHost* process = Source(source).ptr(); + RenderProcessHost* process = + content::Source(source).ptr(); Profile* profile = Profile::FromBrowserContext( process->browser_context()); if (!profile_->IsSameProfile(profile)) -- cgit v1.1