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

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

Issue 10834261: Move chrome.experimental.app.onLaunched event handler to chrome.app.runtime.onLaunched. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another merge before retrying commit. Created 8 years, 4 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 | Annotate | Revision Log
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_APP_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_APP_RUNTIME_APP_RUNTIME_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_APP_APP_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_APP_RUNTIME_APP_RUNTIME_API_H_
7 7
8 #include "chrome/browser/extensions/extension_function.h" 8 #include "base/string16.h"
9 9
10 class Profile; 10 class Profile;
11 class GURL;
12 11
13 namespace webkit_glue { 12 namespace webkit_glue {
14 struct WebIntentData; 13 struct WebIntentData;
15 } 14 }
16 15
17 namespace extensions { 16 namespace extensions {
18 17
19 class Extension; 18 class Extension;
20 19
21 class AppNotifyFunction : public SyncExtensionFunction {
22 public:
23 DECLARE_EXTENSION_FUNCTION_NAME("experimental.app.notify");
24
25 protected:
26 virtual ~AppNotifyFunction() {}
27 virtual bool RunImpl() OVERRIDE;
28 };
29
30 class AppClearAllNotificationsFunction : public SyncExtensionFunction {
31 public:
32 DECLARE_EXTENSION_FUNCTION_NAME("experimental.app.clearAllNotifications");
33
34 protected:
35 virtual ~AppClearAllNotificationsFunction() {}
36 virtual bool RunImpl() OVERRIDE;
37 };
38
39 class AppEventRouter { 20 class AppEventRouter {
40 public: 21 public:
41 // Dispatches the onLaunched event to the given app, providing no launch 22 // Dispatches the onLaunched event to the given app, providing no launch
42 // data. 23 // data.
43 static void DispatchOnLaunchedEvent(Profile* profile, 24 static void DispatchOnLaunchedEvent(Profile* profile,
44 const Extension* extension); 25 const Extension* extension);
45 26
46 // Dispatches the onLaunched event to the given app, providing launch data of 27 // Dispatches the onLaunched event to the given app, providing launch data of
47 // the form: 28 // the form:
48 // { 29 // {
(...skipping 20 matching lines...) Expand all
69 // running in |profile|. The event parameter launchData will have a field 50 // running in |profile|. The event parameter launchData will have a field
70 // called intent, populated by |web_intent_data|. 51 // called intent, populated by |web_intent_data|.
71 static void DispatchOnLaunchedEventWithWebIntent( 52 static void DispatchOnLaunchedEventWithWebIntent(
72 Profile* profile, 53 Profile* profile,
73 const Extension* extension, 54 const Extension* extension,
74 const webkit_glue::WebIntentData web_intent_data); 55 const webkit_glue::WebIntentData web_intent_data);
75 }; 56 };
76 57
77 } // namespace extensions 58 } // namespace extensions
78 59
79 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_APP_API_H_ 60 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_RUNTIME_APP_RUNTIME_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/app/app_api.cc ('k') | 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