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

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: rebase, RuntimeDataTest tweak, win warning 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 91dcf2819d19dd842ee02833e9d59288acea75f7..a05e0f44ad0ec57c80ec7c044d09e45881ee12fa 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -73,6 +73,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"
@@ -571,10 +572,10 @@ void ExtensionUninstallObserver::Observe(
}
ExtensionReadyNotificationObserver::ExtensionReadyNotificationObserver(
- extensions::ProcessManager* manager, ExtensionService* service,
- AutomationProvider* automation, IPC::Message* reply_message)
- : manager_(manager),
- service_(service),
+ extensions::ExtensionSystem* extension_system,
+ AutomationProvider* automation,
+ IPC::Message* reply_message)
+ : extension_system_(extension_system),
automation_(automation->AsWeakPtr()),
reply_message_(reply_message),
extension_(NULL) {
@@ -609,7 +610,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(extension_system_->process_manager()))
return;
break;
case chrome::NOTIFICATION_EXTENSION_LOADED: {
@@ -621,13 +623,13 @@ void ExtensionReadyNotificationObserver::Observe(
!extensions::Manifest::IsUnpackedLocation(location))
return;
extension_ = loaded_extension;
- if (!DidExtensionViewsStopLoading(manager_))
+ if (!DidExtensionViewsStopLoading(extension_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 (!extension_system_->runtime_data()->IsBackgroundPageReady(extension_))
return;
break;
}
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.h ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698