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

Unified Diff: chrome/browser/extensions/api/runtime/runtime_api.cc

Issue 9969087: Switch platform apps from a declarative launch container to handling an onLaunched event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 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/extensions/api/runtime/runtime_api.cc
diff --git a/chrome/browser/extensions/api/runtime/runtime_api.cc b/chrome/browser/extensions/api/runtime/runtime_api.cc
index c2e541bf378f0dc3f815fed43dfc016b7cbd8c82..330069ba4e9823ab9a96d07da0e04a6da0f10172 100644
--- a/chrome/browser/extensions/api/runtime/runtime_api.cc
+++ b/chrome/browser/extensions/api/runtime/runtime_api.cc
@@ -12,6 +12,7 @@
namespace {
const char kOnInstalledEvent[] = "experimental.runtime.onInstalled";
+const char kOnLaunchedEvent[] = "experimental.runtime.onLaunched";
}
@@ -31,4 +32,10 @@ void RuntimeEventRouter::DispatchOnInstalledEvent(
extension->id(), kOnInstalledEvent, "[]", NULL, GURL());
}
+void RuntimeEventRouter::DispatchOnLaunchedEvent(
+ Profile* profile, const Extension* extension) {
+ profile->GetExtensionEventRouter()->DispatchEventToExtension(
+ extension->id(), kOnLaunchedEvent, "[]", NULL, GURL());
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698