| 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 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
| 10 | 10 |
| 11 class Profile; | 11 class Profile; |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 class WebContents; | 14 class WebContents; |
| 15 class WebIntentsDispatcher; | 15 class WebIntentsDispatcher; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace extensions { | 18 namespace extensions { |
| 19 | 19 |
| 20 class Extension; | 20 class Extension; |
| 21 | 21 |
| 22 class AppEventRouter { | 22 class AppEventRouter { |
| 23 public: | 23 public: |
| 24 // Dispatches the onLaunched event to the given app, providing no launch | 24 // Dispatches the onLaunched event to the given app, providing no launch |
| 25 // data. | 25 // data. |
| 26 static void DispatchOnLaunchedEvent(Profile* profile, | 26 static void DispatchOnLaunchedEvent(Profile* profile, |
| 27 const Extension* extension); | 27 const Extension* extension); |
| 28 static void DispatchOnRestartedEvent(Profile* profile, | |
| 29 const Extension* extension); | |
| 30 | 28 |
| 31 // 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 |
| 32 // the form: | 30 // the form: |
| 33 // { | 31 // { |
| 34 // "intent" : { | 32 // "intent" : { |
| 35 // "action" : |action|, | 33 // "action" : |action|, |
| 36 // "type" : "chrome-extension://fileentry", | 34 // "type" : "chrome-extension://fileentry", |
| 37 // "data" : a FileEntry, | 35 // "data" : a FileEntry, |
| 38 // "postResults" : a null function, | 36 // "postResults" : a null function, |
| 39 // "postFailure" : a null function | 37 // "postFailure" : a null function |
| (...skipping 25 matching lines...) Expand all Loading... |
| 65 DECLARE_EXTENSION_FUNCTION_NAME("app.runtime.postIntentResponse"); | 63 DECLARE_EXTENSION_FUNCTION_NAME("app.runtime.postIntentResponse"); |
| 66 | 64 |
| 67 protected: | 65 protected: |
| 68 virtual ~AppRuntimePostIntentResponseFunction() {} | 66 virtual ~AppRuntimePostIntentResponseFunction() {} |
| 69 virtual bool RunImpl() OVERRIDE; | 67 virtual bool RunImpl() OVERRIDE; |
| 70 }; | 68 }; |
| 71 | 69 |
| 72 } // namespace extensions | 70 } // namespace extensions |
| 73 | 71 |
| 74 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_RUNTIME_APP_RUNTIME_API_H_ | 72 #endif // CHROME_BROWSER_EXTENSIONS_API_APP_RUNTIME_APP_RUNTIME_API_H_ |
| OLD | NEW |