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 "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "extensions/browser/event_router.h" | 10 #include "extensions/browser/event_router.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 case extensions::SOURCE_SYSTEM_TRAY: | 91 case extensions::SOURCE_SYSTEM_TRAY: |
92 return app_runtime::LAUNCH_SOURCE_SYSTEM_TRAY; | 92 return app_runtime::LAUNCH_SOURCE_SYSTEM_TRAY; |
93 case extensions::SOURCE_ABOUT_PAGE: | 93 case extensions::SOURCE_ABOUT_PAGE: |
94 return app_runtime::LAUNCH_SOURCE_ABOUT_PAGE; | 94 return app_runtime::LAUNCH_SOURCE_ABOUT_PAGE; |
95 case extensions::SOURCE_KEYBOARD: | 95 case extensions::SOURCE_KEYBOARD: |
96 return app_runtime::LAUNCH_SOURCE_KEYBOARD; | 96 return app_runtime::LAUNCH_SOURCE_KEYBOARD; |
97 case extensions::SOURCE_EXTENSIONS_PAGE: | 97 case extensions::SOURCE_EXTENSIONS_PAGE: |
98 return app_runtime::LAUNCH_SOURCE_EXTENSIONS_PAGE; | 98 return app_runtime::LAUNCH_SOURCE_EXTENSIONS_PAGE; |
99 case extensions::SOURCE_MANAGEMENT_API: | 99 case extensions::SOURCE_MANAGEMENT_API: |
100 return app_runtime::LAUNCH_SOURCE_MANAGEMENT_API; | 100 return app_runtime::LAUNCH_SOURCE_MANAGEMENT_API; |
101 case extensions::SOURCE_EPHEMERAL_APP_UNUSED: | 101 case extensions::SOURCE_EPHEMERAL_APP_DEPRECATED: |
102 return app_runtime::LAUNCH_SOURCE_EPHEMERAL_APP; | 102 return app_runtime::LAUNCH_SOURCE_EPHEMERAL_APP; |
103 case extensions::SOURCE_BACKGROUND: | 103 case extensions::SOURCE_BACKGROUND: |
104 return app_runtime::LAUNCH_SOURCE_BACKGROUND; | 104 return app_runtime::LAUNCH_SOURCE_BACKGROUND; |
105 case extensions::SOURCE_KIOSK: | 105 case extensions::SOURCE_KIOSK: |
106 return app_runtime::LAUNCH_SOURCE_KIOSK; | 106 return app_runtime::LAUNCH_SOURCE_KIOSK; |
107 case extensions::SOURCE_CHROME_INTERNAL: | 107 case extensions::SOURCE_CHROME_INTERNAL: |
108 return app_runtime::LAUNCH_SOURCE_CHROME_INTERNAL; | 108 return app_runtime::LAUNCH_SOURCE_CHROME_INTERNAL; |
109 case extensions::SOURCE_TEST: | 109 case extensions::SOURCE_TEST: |
110 return app_runtime::LAUNCH_SOURCE_TEST; | 110 return app_runtime::LAUNCH_SOURCE_TEST; |
111 | 111 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 launch_data.url.reset(new std::string(url.spec())); | 201 launch_data.url.reset(new std::string(url.spec())); |
202 launch_data.referrer_url.reset(new std::string(referrer_url.spec())); | 202 launch_data.referrer_url.reset(new std::string(referrer_url.spec())); |
203 if (extensions::FeatureSwitch::trace_app_source()->IsEnabled()) { | 203 if (extensions::FeatureSwitch::trace_app_source()->IsEnabled()) { |
204 launch_data.source = source_enum; | 204 launch_data.source = source_enum; |
205 } | 205 } |
206 DispatchOnLaunchedEventImpl( | 206 DispatchOnLaunchedEventImpl( |
207 extension->id(), source_enum, launch_data.ToValue().Pass(), context); | 207 extension->id(), source_enum, launch_data.ToValue().Pass(), context); |
208 } | 208 } |
209 | 209 |
210 } // namespace extensions | 210 } // namespace extensions |
OLD | NEW |