OLD | NEW |
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 | 9 |
10 class Profile; | 10 class Profile; |
11 | 11 |
12 namespace webkit_glue { | 12 namespace webkit_glue { |
13 struct WebIntentData; | 13 struct WebIntentData; |
14 } | 14 } |
15 | 15 |
16 namespace extensions { | 16 namespace extensions { |
17 | 17 |
18 class Extension; | 18 class Extension; |
19 | 19 |
20 class AppEventRouter { | 20 class AppEventRouter { |
21 public: | 21 public: |
22 // Dispatches the onLaunched event to the given app, providing no launch | 22 // Dispatches the onLaunched event to the given app, providing no launch |
23 // data. | 23 // data. |
24 static void DispatchOnLaunchedEvent(Profile* profile, | 24 static void DispatchOnLaunchedEvent(Profile* profile, |
25 const Extension* extension); | 25 const Extension* extension); |
| 26 static void DispatchOnRestartedEvent(Profile* profile, |
| 27 const Extension* extension); |
26 | 28 |
27 // Dispatches the onLaunched event to the given app, providing launch data of | 29 // Dispatches the onLaunched event to the given app, providing launch data of |
28 // the form: | 30 // the form: |
29 // { | 31 // { |
30 // "intent" : { | 32 // "intent" : { |
31 // "action" : |action|, | 33 // "action" : |action|, |
32 // "type" : "chrome-extension://fileentry", | 34 // "type" : "chrome-extension://fileentry", |
33 // "data" : a FileEntry, | 35 // "data" : a FileEntry, |
34 // "postResults" : a null function, | 36 // "postResults" : a null function, |
35 // "postFailure" : a null function | 37 // "postFailure" : a null function |
(...skipping 15 matching lines...) Expand all Loading... |
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 const webkit_glue::WebIntentData web_intent_data); |
56 }; | 58 }; |
57 | 59 |
58 } // namespace extensions | 60 } // namespace extensions |
59 | 61 |
60 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_RUNTIME_APP_RUNTIME_API_H_ | 62 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_RUNTIME_APP_RUNTIME_API_H_ |
OLD | NEW |