Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: chrome/browser/automation/automation_provider_observers.cc

Issue 131743021: app_shell: Extract extension runtime data from ExtensionService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup, unit test (runtime_data) Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/automation/automation_provider_observers.cc
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index bdf41a5bbfe1c35c521ce2cc2c862bd7391493e9..28c8299d63a388343f68b40e57c6b62eaefc7b25 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -78,6 +78,7 @@
#include "content/public/common/process_type.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/process_manager.h"
+#include "extensions/browser/runtime_data.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
#include "extensions/common/manifest.h"
@@ -572,10 +573,10 @@ void ExtensionUninstallObserver::Observe(
}
ExtensionReadyNotificationObserver::ExtensionReadyNotificationObserver(
- extensions::ProcessManager* manager, ExtensionService* service,
- AutomationProvider* automation, IPC::Message* reply_message)
- : manager_(manager),
- service_(service),
+ extensions::ExtensionSystem* system,
not at google - send to devlin 2014/01/18 01:09:04 given this file isn't extensions related I'd expec
James Cook 2014/01/18 02:01:18 No worries. Done.
+ AutomationProvider* automation,
+ IPC::Message* reply_message)
+ : system_(system),
automation_(automation->AsWeakPtr()),
reply_message_(reply_message),
extension_(NULL) {
@@ -610,7 +611,8 @@ void ExtensionReadyNotificationObserver::Observe(
case content::NOTIFICATION_LOAD_STOP:
// Only continue on with this method if our extension has been loaded
// and all the extension views have stopped loading.
- if (!extension_ || !DidExtensionViewsStopLoading(manager_))
+ if (!extension_ ||
+ !DidExtensionViewsStopLoading(system_->process_manager()))
return;
break;
case chrome::NOTIFICATION_EXTENSION_LOADED: {
@@ -622,13 +624,13 @@ void ExtensionReadyNotificationObserver::Observe(
!extensions::Manifest::IsUnpackedLocation(location))
return;
extension_ = loaded_extension;
- if (!DidExtensionViewsStopLoading(manager_))
+ if (!DidExtensionViewsStopLoading(system_->process_manager()))
return;
// For some reason, the background extension view is not yet
// created at this point so just checking whether all extension views
// are loaded is not sufficient. If background page is not ready,
// we wait for NOTIFICATION_LOAD_STOP.
- if (!service_->IsBackgroundPageReady(extension_))
+ if (!system_->runtime_data()->IsBackgroundPageReady(extension_))
return;
break;
}

Powered by Google App Engine
This is Rietveld 408576698