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

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: respond to comments, rebase Created 8 years, 3 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 614dfe1e4de7d7bacbe1d403b98fff0e06cc8fee..395148be5316b06b0b1f01736e3eeafb65910810 100644
--- a/chrome/browser/extensions/api/app_runtime/app_runtime_api.cc
+++ b/chrome/browser/extensions/api/app_runtime/app_runtime_api.cc
@@ -18,6 +18,7 @@
namespace {
const char kOnLaunchedEvent[] = "app.runtime.onLaunched";
+const char kOnRestartedEvent[] = "app.runtime.onRestarted";
} // anonymous namespace
@@ -32,6 +33,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) {

Powered by Google App Engine
This is Rietveld 408576698