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

Unified Diff: chrome/browser/extensions/api/app/app_api.h

Issue 10332071: Pass command line arguments onto platform apps which provide the right intent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fixed, postResult added Created 8 years, 7 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/app_api.h
diff --git a/chrome/browser/extensions/api/app/app_api.h b/chrome/browser/extensions/api/app/app_api.h
index 864deceee2211f4970ea779b98f5844821cb1424..67d0440db7c9d1bf069e80da0eb3a6a06f508c31 100644
--- a/chrome/browser/extensions/api/app/app_api.h
+++ b/chrome/browser/extensions/api/app/app_api.h
@@ -10,6 +10,7 @@
class Extension;
class Profile;
+class GURL;
namespace extensions {
@@ -33,9 +34,32 @@ class AppClearAllNotificationsFunction : public SyncExtensionFunction {
class AppEventRouter {
public:
- // Dispatches the onLaunched event to the given app.
+ // Dispatches the onLaunched event to the given app, providing no launch
+ // data.
static void DispatchOnLaunchedEvent(Profile* profile,
const Extension* extension);
+
+ // Dispatches the onLaunched event to the given app, providing launch data of
+ // the form:
+ // {
+ // "intent" : {
+ // "action" : |action|,
+ // "type" : |mime_type|,
Greg Billock 2012/05/18 14:14:39 If the data is always a FileEntry, the type should
benwells 2012/05/22 13:15:03 Done.
+ // "data" : a FileEntry,
+ // "postResults" : a null function
Greg Billock 2012/05/18 14:14:39 The spec uses two return functions: "postResult" a
benwells 2012/05/22 13:15:03 Done.
+ // }
+ // }
+
+ // launchData.intent.data and launchData.intent.postResults are created in a
+ // custom dispatch event in javascript. The FileEntry is created from
+ // |file_system_id| and |base_name|.
+ static void DispatchOnLaunchedEventWithFileEntry(
+ Profile* profile,
+ const Extension* extension,
+ const string16& action,
+ const std::string& mime_type,
+ const std::string& file_system_id,
+ const std::string& base_name);
};
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698