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

Unified Diff: chrome/browser/extensions/api/app_runtime/app_runtime_api.cc

Issue 10875027: Restart running apps when chrome restarts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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/app_runtime/app_runtime_api.cc
diff --git a/chrome/browser/extensions/api/app_runtime/app_runtime_api.cc b/chrome/browser/extensions/api/app_runtime/app_runtime_api.cc
index 5527bcdc8581ec37638385a839d403207d876016..ab53aa773184cb7102ec1196f8d8ce330cca84fb 100644
--- a/chrome/browser/extensions/api/app_runtime/app_runtime_api.cc
+++ b/chrome/browser/extensions/api/app_runtime/app_runtime_api.cc
@@ -24,6 +24,7 @@ const char kIntentIdKey[] = "intentId";
const char kIntentSuccessKey[] = "success";
const char kIntentDataKey[] = "data";
const char kOnLaunchedEvent[] = "app.runtime.onLaunched";
+const char kOnRestartedEvent[] = "app.runtime.onRestarted";
const char kCallbackNotFoundError[] =
"WebIntent callback not found; perhaps already responded to";
@@ -41,6 +42,14 @@ void AppEventRouter::DispatchOnLaunchedEvent(
}
// static.
+void AppEventRouter::DispatchOnRestartedEvent(
+ Profile* profile, const Extension* extension) {
+ scoped_ptr<ListValue> arguments(new ListValue());
+ profile->GetExtensionEventRouter()->DispatchEventToExtension(
+ extension->id(), kOnRestartedEvent, arguments.Pass(), NULL, GURL());
+}
+
+// static.
void AppEventRouter::DispatchOnLaunchedEventWithFileEntry(
Profile* profile, const Extension* extension, const string16& action,
const std::string& file_system_id, const std::string& base_name) {
« no previous file with comments | « chrome/browser/extensions/api/app_runtime/app_runtime_api.h ('k') | chrome/browser/extensions/app_restore_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698