summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/user_script_master.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 02:52:53 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 02:52:53 +0000
commit6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c (patch)
treea75584b11b8ef188b4eb3376b9146e063823a916 /chrome/browser/extensions/user_script_master.cc
parentbf3ee201c1ca5112f7fd173fc4785aa52920c5c0 (diff)
downloadchromium_src-6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c.zip
chromium_src-6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c.tar.gz
chromium_src-6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c.tar.bz2
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
Diffstat (limited to 'chrome/browser/extensions/user_script_master.cc')
-rw-r--r--chrome/browser/extensions/user_script_master.cc22
1 files changed, 12 insertions, 10 deletions
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>(profile_));
+ content::Source<Profile>(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, 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>(profile_),
- Details<base::SharedMemory>(handle));
+ content::Source<Profile>(profile_),
+ content::Details<base::SharedMemory>(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<const Extension>(details).ptr();
+ const Extension* extension =
+ content::Details<const Extension>(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<UnloadedExtensionInfo>(details)->extension;
+ content::Details<UnloadedExtensionInfo>(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<RenderProcessHost>(source).ptr();
+ RenderProcessHost* process =
+ content::Source<RenderProcessHost>(source).ptr();
Profile* profile = Profile::FromBrowserContext(
process->browser_context());
if (!profile_->IsSameProfile(profile))