Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Side by Side Diff: extensions/browser/api/app_runtime/app_runtime_api.cc

Issue 720633003: Revert of CL 722703002 due to build breakage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/sessions/OWNERS ('k') | extensions/common/api/app_runtime.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 case extensions::SOURCE_RESTART: 76 case extensions::SOURCE_RESTART:
77 return app_runtime::LAUNCH_SOURCE_RESTART; 77 return app_runtime::LAUNCH_SOURCE_RESTART;
78 case extensions::SOURCE_LOAD_AND_LAUNCH: 78 case extensions::SOURCE_LOAD_AND_LAUNCH:
79 return app_runtime::LAUNCH_SOURCE_LOAD_AND_LAUNCH; 79 return app_runtime::LAUNCH_SOURCE_LOAD_AND_LAUNCH;
80 case extensions::SOURCE_COMMAND_LINE: 80 case extensions::SOURCE_COMMAND_LINE:
81 return app_runtime::LAUNCH_SOURCE_COMMAND_LINE; 81 return app_runtime::LAUNCH_SOURCE_COMMAND_LINE;
82 case extensions::SOURCE_FILE_HANDLER: 82 case extensions::SOURCE_FILE_HANDLER:
83 return app_runtime::LAUNCH_SOURCE_FILE_HANDLER; 83 return app_runtime::LAUNCH_SOURCE_FILE_HANDLER;
84 case extensions::SOURCE_URL_HANDLER: 84 case extensions::SOURCE_URL_HANDLER:
85 return app_runtime::LAUNCH_SOURCE_URL_HANDLER; 85 return app_runtime::LAUNCH_SOURCE_URL_HANDLER;
86
86 case extensions::SOURCE_SYSTEM_TRAY: 87 case extensions::SOURCE_SYSTEM_TRAY:
87 return app_runtime::LAUNCH_SOURCE_SYSTEM_TRAY; 88 return app_runtime::LAUNCH_SOURCE_SYSTEM_TRAY;
88 case extensions::SOURCE_ABOUT_PAGE: 89 case extensions::SOURCE_ABOUT_PAGE:
89 return app_runtime::LAUNCH_SOURCE_ABOUT_PAGE; 90 return app_runtime::LAUNCH_SOURCE_ABOUT_PAGE;
90 case extensions::SOURCE_KEYBOARD: 91 case extensions::SOURCE_KEYBOARD:
91 return app_runtime::LAUNCH_SOURCE_KEYBOARD; 92 return app_runtime::LAUNCH_SOURCE_KEYBOARD;
92 case extensions::SOURCE_EXTENSIONS_PAGE:
93 return app_runtime::LAUNCH_SOURCE_EXTENSIONS_PAGE;
94 case extensions::SOURCE_MANAGEMENT_API:
95 return app_runtime::LAUNCH_SOURCE_MANAGEMENT_API;
96 case extensions::SOURCE_EPHEMERAL_APP:
97 return app_runtime::LAUNCH_SOURCE_EPHEMERAL_APP;
98 case extensions::SOURCE_BACKGROUND:
99 return app_runtime::LAUNCH_SOURCE_BACKGROUND;
100 case extensions::SOURCE_KIOSK:
101 return app_runtime::LAUNCH_SOURCE_KIOSK;
102 case extensions::SOURCE_CHROME_INTERNAL:
103 return app_runtime::LAUNCH_SOURCE_CHROME_INTERNAL;
104 93
105 default: 94 default:
106 return app_runtime::LAUNCH_SOURCE_NONE; 95 return app_runtime::LAUNCH_SOURCE_NONE;
107 } 96 }
108 } 97 }
109 98
110 } // namespace 99 } // namespace
111 100
112 // static 101 // static
113 void AppRuntimeEventRouter::DispatchOnEmbedRequestedEvent( 102 void AppRuntimeEventRouter::DispatchOnEmbedRequestedEvent(
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 launch_data.url.reset(new std::string(url.spec())); 182 launch_data.url.reset(new std::string(url.spec()));
194 launch_data.referrer_url.reset(new std::string(referrer_url.spec())); 183 launch_data.referrer_url.reset(new std::string(referrer_url.spec()));
195 if (extensions::FeatureSwitch::trace_app_source()->IsEnabled()) { 184 if (extensions::FeatureSwitch::trace_app_source()->IsEnabled()) {
196 launch_data.source = source_enum; 185 launch_data.source = source_enum;
197 } 186 }
198 DispatchOnLaunchedEventImpl( 187 DispatchOnLaunchedEventImpl(
199 extension->id(), source_enum, launch_data.ToValue().Pass(), context); 188 extension->id(), source_enum, launch_data.ToValue().Pass(), context);
200 } 189 }
201 190
202 } // namespace extensions 191 } // namespace extensions
OLDNEW
« no previous file with comments | « components/sessions/OWNERS ('k') | extensions/common/api/app_runtime.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698