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

Side by Side Diff: chrome/browser/extensions/api/app_runtime/app_runtime_api.h

Issue 10828172: Allow platform apps to respond to Web Intents (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: about to submit 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/app_runtime/app_runtime_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_APP_RUNTIME_APP_RUNTIME_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_APP_RUNTIME_APP_RUNTIME_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_APP_RUNTIME_APP_RUNTIME_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_APP_RUNTIME_APP_RUNTIME_API_H_
7 7
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "chrome/browser/extensions/extension_function.h"
9 10
10 class Profile; 11 class Profile;
11 12
12 namespace webkit_glue { 13 namespace content {
13 struct WebIntentData; 14 class WebContents;
15 class WebIntentsDispatcher;
14 } 16 }
15 17
16 namespace extensions { 18 namespace extensions {
17 19
18 class Extension; 20 class Extension;
19 21
20 class AppEventRouter { 22 class AppEventRouter {
21 public: 23 public:
22 // Dispatches the onLaunched event to the given app, providing no launch 24 // Dispatches the onLaunched event to the given app, providing no launch
23 // data. 25 // data.
(...skipping 21 matching lines...) Expand all
45 const string16& action, 47 const string16& action,
46 const std::string& file_system_id, 48 const std::string& file_system_id,
47 const std::string& base_name); 49 const std::string& base_name);
48 50
49 // Dispatches the onLaunched event to the app implemented by |extension| 51 // Dispatches the onLaunched event to the app implemented by |extension|
50 // running in |profile|. The event parameter launchData will have a field 52 // running in |profile|. The event parameter launchData will have a field
51 // called intent, populated by |web_intent_data|. 53 // called intent, populated by |web_intent_data|.
52 static void DispatchOnLaunchedEventWithWebIntent( 54 static void DispatchOnLaunchedEventWithWebIntent(
53 Profile* profile, 55 Profile* profile,
54 const Extension* extension, 56 const Extension* extension,
55 const webkit_glue::WebIntentData web_intent_data); 57 content::WebIntentsDispatcher* intents_dispatcher,
58 content::WebContents* source);
59 };
60
61 class AppRuntimePostIntentResponseFunction : public SyncExtensionFunction {
62 public:
63 DECLARE_EXTENSION_FUNCTION_NAME("app.runtime.postIntentResponse");
64
65 protected:
66 virtual ~AppRuntimePostIntentResponseFunction() {}
67 virtual bool RunImpl() OVERRIDE;
56 }; 68 };
57 69
58 } // namespace extensions 70 } // namespace extensions
59 71
60 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_RUNTIME_APP_RUNTIME_API_H_ 72 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_RUNTIME_APP_RUNTIME_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/app_runtime/app_runtime_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698