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 #include "extensions/browser/api/app_runtime/app_runtime_api.h" | 5 #include "extensions/browser/api/app_runtime/app_runtime_api.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 case extensions::SOURCE_EPHEMERAL_APP_DEPRECATED: | 107 case extensions::SOURCE_EPHEMERAL_APP_DEPRECATED: |
108 return app_runtime::LAUNCH_SOURCE_EPHEMERAL_APP; | 108 return app_runtime::LAUNCH_SOURCE_EPHEMERAL_APP; |
109 case extensions::SOURCE_BACKGROUND: | 109 case extensions::SOURCE_BACKGROUND: |
110 return app_runtime::LAUNCH_SOURCE_BACKGROUND; | 110 return app_runtime::LAUNCH_SOURCE_BACKGROUND; |
111 case extensions::SOURCE_KIOSK: | 111 case extensions::SOURCE_KIOSK: |
112 return app_runtime::LAUNCH_SOURCE_KIOSK; | 112 return app_runtime::LAUNCH_SOURCE_KIOSK; |
113 case extensions::SOURCE_CHROME_INTERNAL: | 113 case extensions::SOURCE_CHROME_INTERNAL: |
114 return app_runtime::LAUNCH_SOURCE_CHROME_INTERNAL; | 114 return app_runtime::LAUNCH_SOURCE_CHROME_INTERNAL; |
115 case extensions::SOURCE_TEST: | 115 case extensions::SOURCE_TEST: |
116 return app_runtime::LAUNCH_SOURCE_TEST; | 116 return app_runtime::LAUNCH_SOURCE_TEST; |
| 117 case extensions::SOURCE_INSTALLED_NOTIFICATION: |
| 118 return app_runtime::LAUNCH_SOURCE_INSTALLED_NOTIFICATION; |
117 | 119 |
118 default: | 120 default: |
119 return app_runtime::LAUNCH_SOURCE_NONE; | 121 return app_runtime::LAUNCH_SOURCE_NONE; |
120 } | 122 } |
121 } | 123 } |
122 | 124 |
123 } // namespace | 125 } // namespace |
124 | 126 |
125 // static | 127 // static |
126 void AppRuntimeEventRouter::DispatchOnEmbedRequestedEvent( | 128 void AppRuntimeEventRouter::DispatchOnEmbedRequestedEvent( |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 launch_data.url.reset(new std::string(url.spec())); | 211 launch_data.url.reset(new std::string(url.spec())); |
210 launch_data.referrer_url.reset(new std::string(referrer_url.spec())); | 212 launch_data.referrer_url.reset(new std::string(referrer_url.spec())); |
211 if (extensions::FeatureSwitch::trace_app_source()->IsEnabled()) { | 213 if (extensions::FeatureSwitch::trace_app_source()->IsEnabled()) { |
212 launch_data.source = source_enum; | 214 launch_data.source = source_enum; |
213 } | 215 } |
214 DispatchOnLaunchedEventImpl(extension->id(), source_enum, | 216 DispatchOnLaunchedEventImpl(extension->id(), source_enum, |
215 launch_data.ToValue(), context); | 217 launch_data.ToValue(), context); |
216 } | 218 } |
217 | 219 |
218 } // namespace extensions | 220 } // namespace extensions |
OLD | NEW |