| 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 <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "extensions/common/constants.h" | 12 #include "extensions/common/constants.h" |
| 13 | 13 |
| 14 class GURL; | 14 class GURL; |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class DictionaryValue; | 17 class DictionaryValue; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 class BrowserContext; | 21 class BrowserContext; |
| 22 class WebContents; | 22 class WebContents; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace extensions { | 25 namespace extensions { |
| 26 | 26 |
| 27 class Extension; | 27 class Extension; |
| 28 struct EntryInfo; | 28 struct EntryInfo; |
| 29 struct GrantedFileEntry; | 29 struct GrantedFileEntry; |
| 30 | 30 |
| 31 class AppRuntimeEventRouter { | 31 class AppRuntimeEventRouter { |
| 32 public: | 32 public: |
| 33 // Dispatches the onEmbedRequested event to the given app. | 33 // Dispatches the onEmbedRequested event to the given app. |
| 34 static void DispatchOnEmbedRequestedEvent( | 34 static void DispatchOnEmbedRequestedEvent( |
| 35 content::BrowserContext* context, | 35 content::BrowserContext* context, |
| 36 scoped_ptr<base::DictionaryValue> app_embedding_request_data, | 36 std::unique_ptr<base::DictionaryValue> app_embedding_request_data, |
| 37 const extensions::Extension* extension); | 37 const extensions::Extension* extension); |
| 38 | 38 |
| 39 // Dispatches the onLaunched event to the given app. | 39 // Dispatches the onLaunched event to the given app. |
| 40 static void DispatchOnLaunchedEvent(content::BrowserContext* context, | 40 static void DispatchOnLaunchedEvent(content::BrowserContext* context, |
| 41 const Extension* extension, | 41 const Extension* extension, |
| 42 extensions::AppLaunchSource source); | 42 extensions::AppLaunchSource source); |
| 43 | 43 |
| 44 // Dispatches the onRestarted event to the given app, providing a list of | 44 // Dispatches the onRestarted event to the given app, providing a list of |
| 45 // restored file entries from the previous run. | 45 // restored file entries from the previous run. |
| 46 static void DispatchOnRestartedEvent(content::BrowserContext* context, | 46 static void DispatchOnRestartedEvent(content::BrowserContext* context, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 73 static void DispatchOnLaunchedEventWithUrl(content::BrowserContext* context, | 73 static void DispatchOnLaunchedEventWithUrl(content::BrowserContext* context, |
| 74 const Extension* extension, | 74 const Extension* extension, |
| 75 const std::string& handler_id, | 75 const std::string& handler_id, |
| 76 const GURL& url, | 76 const GURL& url, |
| 77 const GURL& referrer_url); | 77 const GURL& referrer_url); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace extensions | 80 } // namespace extensions |
| 81 | 81 |
| 82 #endif // EXTENSIONS_BROWSER_API_APP_RUNTIME_APP_RUNTIME_API_H_ | 82 #endif // EXTENSIONS_BROWSER_API_APP_RUNTIME_APP_RUNTIME_API_H_ |
| OLD | NEW |