OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_API_APP_RUNTIME_APP_RUNTIME_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_APP_RUNTIME_APP_RUNTIME_API_H_ |
6 #define EXTENSIONS_BROWSER_API_APP_RUNTIME_APP_RUNTIME_API_H_ | 6 #define EXTENSIONS_BROWSER_API_APP_RUNTIME_APP_RUNTIME_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/values.h" |
| 13 |
11 class GURL; | 14 class GURL; |
12 | 15 |
13 namespace content { | 16 namespace content { |
14 class BrowserContext; | 17 class BrowserContext; |
15 class WebContents; | 18 class WebContents; |
16 } | 19 } |
17 | 20 |
18 namespace extensions { | 21 namespace extensions { |
19 | 22 |
20 class Extension; | 23 class Extension; |
21 struct GrantedFileEntry; | 24 struct GrantedFileEntry; |
22 | 25 |
23 class AppRuntimeEventRouter { | 26 class AppRuntimeEventRouter { |
24 public: | 27 public: |
| 28 // Dispatches the onAppEmbeddingRequest event to the given app. |
| 29 static void DispatchOnAppEmbeddingRequestEvent( |
| 30 content::BrowserContext* context, |
| 31 scoped_ptr<base::DictionaryValue> app_embedding_request_data, |
| 32 const extensions::Extension* extension); |
| 33 |
25 // Dispatches the onLaunched event to the given app. | 34 // Dispatches the onLaunched event to the given app. |
26 static void DispatchOnLaunchedEvent(content::BrowserContext* context, | 35 static void DispatchOnLaunchedEvent(content::BrowserContext* context, |
27 const Extension* extension); | 36 const Extension* extension); |
28 | 37 |
29 // Dispatches the onRestarted event to the given app, providing a list of | 38 // Dispatches the onRestarted event to the given app, providing a list of |
30 // restored file entries from the previous run. | 39 // restored file entries from the previous run. |
31 static void DispatchOnRestartedEvent(content::BrowserContext* context, | 40 static void DispatchOnRestartedEvent(content::BrowserContext* context, |
32 const Extension* extension); | 41 const Extension* extension); |
33 | 42 |
34 // TODO(benwells): Update this comment, it is out of date. | 43 // TODO(benwells): Update this comment, it is out of date. |
(...skipping 23 matching lines...) Expand all Loading... |
58 static void DispatchOnLaunchedEventWithUrl(content::BrowserContext* context, | 67 static void DispatchOnLaunchedEventWithUrl(content::BrowserContext* context, |
59 const Extension* extension, | 68 const Extension* extension, |
60 const std::string& handler_id, | 69 const std::string& handler_id, |
61 const GURL& url, | 70 const GURL& url, |
62 const GURL& referrer_url); | 71 const GURL& referrer_url); |
63 }; | 72 }; |
64 | 73 |
65 } // namespace extensions | 74 } // namespace extensions |
66 | 75 |
67 #endif // EXTENSIONS_BROWSER_API_APP_RUNTIME_APP_RUNTIME_API_H_ | 76 #endif // EXTENSIONS_BROWSER_API_APP_RUNTIME_APP_RUNTIME_API_H_ |
OLD | NEW |