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