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

Side by Side Diff: trunk/src/chrome/common/extensions/extension_constants.h

Issue 225103004: Revert 261654 "Move some extension constants out of //chrome." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "url/gurl.h" 11 #include "url/gurl.h"
12 12
13 namespace extension_urls { 13 namespace extension_urls {
14 14 // Returns the URL prefix for the extension/apps gallery. Can be set via the
15 // Returns the URL prefix for the extension/apps gallery. Can be set via the 15 // --apps-gallery-url switch. The URL returned will not contain a trailing
16 // --apps-gallery-url switch. The URL returned will not contain a trailing 16 // slash. Do not use this as a prefix/extent for the store.
17 // slash. Do not use this as a prefix/extent for the store. 17 std::string GetWebstoreLaunchURL();
18 std::string GetWebstoreLaunchURL(); 18
19 19 // Returns the URL to the extensions category on the Web Store. This is
20 // Returns the URL to the extensions category on the Web Store. This is 20 // derived from GetWebstoreLaunchURL().
21 // derived from GetWebstoreLaunchURL(). 21 std::string GetExtensionGalleryURL();
22 std::string GetExtensionGalleryURL(); 22
23 23 // Returns the URL prefix for an item in the extension/app gallery. This URL
24 // Returns the URL prefix for an item in the extension/app gallery. This URL 24 // will contain a trailing slash and should be concatenated with an item ID
25 // will contain a trailing slash and should be concatenated with an item ID 25 // to get the item detail URL.
26 // to get the item detail URL. 26 std::string GetWebstoreItemDetailURLPrefix();
27 std::string GetWebstoreItemDetailURLPrefix(); 27
28 28 // Returns the URL used to get webstore data (ratings, manifest, icon URL,
29 // Returns the URL used to get webstore data (ratings, manifest, icon URL, 29 // etc.) about an extension from the webstore as JSON.
30 // etc.) about an extension from the webstore as JSON. 30 GURL GetWebstoreItemJsonDataURL(const std::string& extension_id);
31 GURL GetWebstoreItemJsonDataURL(const std::string& extension_id); 31
32 32 // Returns the URL used to get webstore search results in JSON format. The URL
33 // Returns the URL used to get webstore search results in JSON format. The URL 33 // returns a JSON dictionary that has the search results (under "results").
34 // returns a JSON dictionary that has the search results (under "results"). 34 // Each entry in the array is a dictionary as the data returned for
35 // Each entry in the array is a dictionary as the data returned for 35 // GetWebstoreItemJsonDataURL above. |query| is the user typed query string.
36 // GetWebstoreItemJsonDataURL above. |query| is the user typed query string. 36 // |hl| is the host language code, e.g. en_US. Both arguments will be escaped
37 // |hl| is the host language code, e.g. en_US. Both arguments will be escaped 37 // and added as a query parameter to the returned web store json search URL.
38 // and added as a query parameter to the returned web store json search URL. 38 GURL GetWebstoreJsonSearchUrl(const std::string& query,
39 GURL GetWebstoreJsonSearchUrl(const std::string& query, const std::string& hl); 39 const std::string& hl);
40 40
41 // Returns the URL of the web store search results page for |query|. 41 // Returns the URL of the web store search results page for |query|.
42 GURL GetWebstoreSearchPageUrl(const std::string& query); 42 GURL GetWebstoreSearchPageUrl(const std::string& query);
43 43
44 // Return the update URL used by gallery/webstore extensions/apps. 44 // Return the update URL used by gallery/webstore extensions/apps.
45 GURL GetWebstoreUpdateUrl(); 45 GURL GetWebstoreUpdateUrl();
46 46
47 // Returns whether the URL is the webstore update URL (just considering host 47 // Returns whether the URL is the webstore update URL (just considering host
48 // and path, not scheme, query, etc.) 48 // and path, not scheme, query, etc.)
49 bool IsWebstoreUpdateUrl(const GURL& update_url); 49 bool IsWebstoreUpdateUrl(const GURL& update_url);
50 50
51 // Returns true if the URL points to an extension blacklist. 51 // Returns true if the URL points to an extension blacklist.
52 bool IsBlacklistUpdateUrl(const GURL& url); 52 bool IsBlacklistUpdateUrl(const GURL& url);
53 // The greatest common prefixes of the main extensions gallery's browse and 53
54 // download URLs. 54 // The greatest common prefixes of the main extensions gallery's browse and
55 extern const char kGalleryBrowsePrefix[]; 55 // download URLs.
56 56 extern const char kGalleryBrowsePrefix[];
57 // Field to use with webstore URL for tracking launch source. 57
58 extern const char kWebstoreSourceField[]; 58 // Field to use with webstore URL for tracking launch source.
59 59 extern const char kWebstoreSourceField[];
60 // Values to use with webstore URL launch source field. 60
61 extern const char kLaunchSourceAppList[]; 61 // Values to use with webstore URL launch source field.
62 extern const char kLaunchSourceAppListSearch[]; 62 extern const char kLaunchSourceAppList[];
63 extern const char kLaunchSourceAppListInfoDialog[]; 63 extern const char kLaunchSourceAppListSearch[];
64 64 extern const char kLaunchSourceAppListInfoDialog[];
65 } // namespace extension_urls 65 } // namespace extension_urls
66 66
67 namespace extension_misc { 67 namespace extension_misc {
68 68 // Matches chrome.windows.WINDOW_ID_NONE.
69 // The extension id of the bookmark manager. 69 const int kUnknownWindowId = -1;
70 extern const char kBookmarkManagerId[]; 70
71 71 // Matches chrome.windows.WINDOW_ID_CURRENT.
72 // The extension id of the Chrome component application. 72 const int kCurrentWindowId = -2;
73 extern const char kChromeAppId[]; 73
74 74 // The extension id of the bookmark manager.
75 // The extension id of the Cloud Print component application. 75 extern const char kBookmarkManagerId[];
76 extern const char kCloudPrintAppId[]; 76
77 77 // The extension id of the Chrome component application.
78 // The extension id of the Easy Unlock component application. 78 extern const char kChromeAppId[];
79 extern const char kEasyUnlockAppId[]; 79
80 80 // The extension id of the Cloud Print component application.
81 // The extension id of the Enterprise Web Store component application. 81 extern const char kCloudPrintAppId[];
82 extern const char kEnterpriseWebStoreAppId[]; 82
83 83 // The extension id of the Easy Unlock component application.
84 // The extension id of GMail application. 84 extern const char kEasyUnlockAppId[];
85 extern const char kGmailAppId[]; 85
86 86 // The extension id of the Enterprise Web Store component application.
87 // The extension id of the Google Doc application. 87 extern const char kEnterpriseWebStoreAppId[];
88 extern const char kGoogleDocAppId[]; 88
89 89 // The extension id of GMail application.
90 // The extension id of the Google Play Music application. 90 extern const char kGmailAppId[];
91 extern const char kGooglePlayMusicAppId[]; 91
92 92 // The extension id of the Google Doc application.
93 // The extension id of the Google Search application. 93 extern const char kGoogleDocAppId[];
94 extern const char kGoogleSearchAppId[]; 94
95 95 // The extension id of the Google Play Music application.
96 // The extension id of the Google Sheets application. 96 extern const char kGooglePlayMusicAppId[];
97 extern const char kGoogleSheetsAppId[]; 97
98 98 // The extension id of the Google Search application.
99 // The extension id of the Google Slides application. 99 extern const char kGoogleSearchAppId[];
100 extern const char kGoogleSlidesAppId[]; 100
101 101 // The extension id of the Google Sheets application.
102 // The extension id of the HTerm app for ChromeOS. 102 extern const char kGoogleSheetsAppId[];
103 extern const char kHTermAppId[]; 103
104 104 // The extension id of the Google Slides application.
105 // The extension id of the HTerm dev app for ChromeOS. 105 extern const char kGoogleSlidesAppId[];
106 extern const char kHTermDevAppId[]; 106
107 107 // The extension id of the HTerm app for ChromeOS.
108 // The extension id of the Identity API UI application. 108 extern const char kHTermAppId[];
109 extern const char kIdentityApiUiAppId[]; 109
110 110 // The extension id of the HTerm dev app for ChromeOS.
111 // The extension id of the Crosh component app for ChromeOS. 111 extern const char kHTermDevAppId[];
112 extern const char kCroshBuiltinAppId[]; 112
113 113 // The extension id of the Crosh component app for ChromeOS.
114 // The extension id of the hotword voice search trigger extension. 114 extern const char kCroshBuiltinAppId[];
115 extern const char kHotwordExtensionId[]; 115
116 116 // The extension id of the hotword voice search trigger extension.
117 // The extension id of the PDF extension. 117 extern const char kHotwordExtensionId[];
118 extern const char kPdfExtensionId[]; 118
119 119 // The extension id of the PDF extension.
120 // The extension id of the Office Viewer component extension. 120 extern const char kPdfExtensionId[];
121 extern const char kQuickOfficeComponentExtensionId[]; 121
122 122 // The extension id of the Office Viewer component extension.
123 // The extension id of the Office Viewer extension on the internal webstore. 123 extern const char kQuickOfficeComponentExtensionId[];
124 extern const char kQuickOfficeInternalExtensionId[]; 124
125 125 // The extension id of the Office Viewer extension on the internal webstore.
126 // The extension id of the Office Viewer extension. 126 extern const char kQuickOfficeInternalExtensionId[];
127 extern const char kQuickOfficeExtensionId[]; 127
128 128 // The extension id of the Office Viewer extension.
129 // The extension id of the settings application. 129 extern const char kQuickOfficeExtensionId[];
130 extern const char kSettingsAppId[]; 130
131 131 // The extension id of the settings application.
132 // The extension id used for testing streamsPrivate 132 extern const char kSettingsAppId[];
133 extern const char kStreamsPrivateTestExtensionId[]; 133
134 134 // The extension id used for testing streamsPrivate
135 // The extension id of the Web Store component application. 135 extern const char kStreamsPrivateTestExtensionId[];
136 extern const char kWebStoreAppId[]; 136
137 137 // The extension id of the Web Store component application.
138 // The extension id of the Youtube application. 138 extern const char kWebStoreAppId[];
139 extern const char kYoutubeAppId[]; 139
140 140 // The extension id of the Youtube application.
141 // The extension id of the in-app payments support application. 141 extern const char kYoutubeAppId[];
142 extern const char kInAppPaymentsSupportAppId[]; 142
143 143 // The extension id of the Identity API UI application.
144 // The name of the app launch histogram. 144 extern const char kIdentityApiUiAppId[];
145 extern const char kAppLaunchHistogram[]; 145
146 146 // The extension id of the in-app payments support application.
147 // The name of the app launch histogram for platform apps. 147 extern const char kInAppPaymentsSupportAppId[];
148 extern const char kPlatformAppLaunchHistogram[]; 148
149 149 // Note: this structure is an ASN.1 which encodes the algorithm used
150 // The buckets used for app launches. 150 // with its parameters. This is defined in PKCS #1 v2.1 (RFC 3447).
151 enum AppLaunchBucket { 151 // It is encoding: { OID sha1WithRSAEncryption PARAMETERS NULL }
152 // Launch from NTP apps section while maximized. 152 const uint8 kSignatureAlgorithm[15] = {
153 APP_LAUNCH_NTP_APPS_MAXIMIZED, 153 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
154 154 0xf7, 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00
155 // Launch from NTP apps section while collapsed. 155 };
156 APP_LAUNCH_NTP_APPS_COLLAPSED, 156
157 157 // The name of the app launch histogram.
158 // Launch from NTP apps section while in menu mode. 158 extern const char kAppLaunchHistogram[];
159 APP_LAUNCH_NTP_APPS_MENU, 159
160 160 // The name of the app launch histogram for platform apps.
161 // Launch from NTP most visited section in any mode. 161 extern const char kPlatformAppLaunchHistogram[];
162 APP_LAUNCH_NTP_MOST_VISITED, 162
163 163 // The buckets used for app launches.
164 // Launch from NTP recently closed section in any mode. 164 enum AppLaunchBucket {
165 APP_LAUNCH_NTP_RECENTLY_CLOSED, 165 // Launch from NTP apps section while maximized.
166 166 APP_LAUNCH_NTP_APPS_MAXIMIZED,
167 // App link clicked from bookmark bar. 167
168 APP_LAUNCH_BOOKMARK_BAR, 168 // Launch from NTP apps section while collapsed.
169 169 APP_LAUNCH_NTP_APPS_COLLAPSED,
170 // Nvigated to an app from within a web page (like by clicking a link). 170
171 APP_LAUNCH_CONTENT_NAVIGATION, 171 // Launch from NTP apps section while in menu mode.
172 172 APP_LAUNCH_NTP_APPS_MENU,
173 // Launch from session restore. 173
174 APP_LAUNCH_SESSION_RESTORE, 174 // Launch from NTP most visited section in any mode.
175 175 APP_LAUNCH_NTP_MOST_VISITED,
176 // Autolaunched at startup, like for pinned tabs. 176
177 APP_LAUNCH_AUTOLAUNCH, 177 // Launch from NTP recently closed section in any mode.
178 178 APP_LAUNCH_NTP_RECENTLY_CLOSED,
179 // Launched from omnibox app links. 179
180 APP_LAUNCH_OMNIBOX_APP, 180 // App link clicked from bookmark bar.
181 181 APP_LAUNCH_BOOKMARK_BAR,
182 // App URL typed directly into the omnibox (w/ instant turned off). 182
183 APP_LAUNCH_OMNIBOX_LOCATION, 183 // Nvigated to an app from within a web page (like by clicking a link).
184 184 APP_LAUNCH_CONTENT_NAVIGATION,
185 // Navigate to an app URL via instant. 185
186 APP_LAUNCH_OMNIBOX_INSTANT, 186 // Launch from session restore.
187 187 APP_LAUNCH_SESSION_RESTORE,
188 // Launch via chrome.management.launchApp. 188
189 APP_LAUNCH_EXTENSION_API, 189 // Autolaunched at startup, like for pinned tabs.
190 190 APP_LAUNCH_AUTOLAUNCH,
191 // Launch an app via a shortcut. This includes using the --app or --app-id 191
192 // command line arguments, or via an app shim process on Mac. 192 // Launched from omnibox app links.
193 APP_LAUNCH_CMD_LINE_APP, 193 APP_LAUNCH_OMNIBOX_APP,
194 194
195 // App launch by passing the URL on the cmd line (not using app switches). 195 // App URL typed directly into the omnibox (w/ instant turned off).
196 APP_LAUNCH_CMD_LINE_URL, 196 APP_LAUNCH_OMNIBOX_LOCATION,
197 197
198 // User clicked web store launcher on NTP. 198 // Navigate to an app URL via instant.
199 APP_LAUNCH_NTP_WEBSTORE, 199 APP_LAUNCH_OMNIBOX_INSTANT,
200 200
201 // App launched after the user re-enabled it on the NTP. 201 // Launch via chrome.management.launchApp.
202 APP_LAUNCH_NTP_APP_RE_ENABLE, 202 APP_LAUNCH_EXTENSION_API,
203 203
204 // URL launched using the --app cmd line option, but the URL does not 204 // Launch an app via a shortcut. This includes using the --app or --app-id
205 // correspond to an installed app. These launches are left over from a 205 // command line arguments, or via an app shim process on Mac.
206 // feature that let you make desktop shortcuts from the file menu. 206 APP_LAUNCH_CMD_LINE_APP,
207 APP_LAUNCH_CMD_LINE_APP_LEGACY, 207
208 208 // App launch by passing the URL on the cmd line (not using app switches).
209 // User clicked web store link on the NTP footer. 209 APP_LAUNCH_CMD_LINE_URL,
210 APP_LAUNCH_NTP_WEBSTORE_FOOTER, 210
211 211 // User clicked web store launcher on NTP.
212 // User clicked [+] icon in apps page. 212 APP_LAUNCH_NTP_WEBSTORE,
213 APP_LAUNCH_NTP_WEBSTORE_PLUS_ICON, 213
214 214 // App launched after the user re-enabled it on the NTP.
215 // User clicked icon in app launcher main view. 215 APP_LAUNCH_NTP_APP_RE_ENABLE,
216 APP_LAUNCH_APP_LIST_MAIN, 216
217 217 // URL launched using the --app cmd line option, but the URL does not
218 // User clicked app launcher search result. 218 // correspond to an installed app. These launches are left over from a
219 APP_LAUNCH_APP_LIST_SEARCH, 219 // feature that let you make desktop shortcuts from the file menu.
220 220 APP_LAUNCH_CMD_LINE_APP_LEGACY,
221 // User clicked the chrome app icon from the app launcher's main view. 221
222 APP_LAUNCH_APP_LIST_MAIN_CHROME, 222 // User clicked web store link on the NTP footer.
223 223 APP_LAUNCH_NTP_WEBSTORE_FOOTER,
224 // User clicked the webstore icon from the app launcher's main view. 224
225 APP_LAUNCH_APP_LIST_MAIN_WEBSTORE, 225 // User clicked [+] icon in apps page.
226 226 APP_LAUNCH_NTP_WEBSTORE_PLUS_ICON,
227 // User clicked the chrome app icon from the app launcher's search view. 227
228 APP_LAUNCH_APP_LIST_SEARCH_CHROME, 228 // User clicked icon in app launcher main view.
229 229 APP_LAUNCH_APP_LIST_MAIN,
230 // User clicked the webstore icon from the app launcher's search view. 230
231 APP_LAUNCH_APP_LIST_SEARCH_WEBSTORE, 231 // User clicked app launcher search result.
232 APP_LAUNCH_BUCKET_BOUNDARY, 232 APP_LAUNCH_APP_LIST_SEARCH,
233 APP_LAUNCH_BUCKET_INVALID 233
234 }; 234 // User clicked the chrome app icon from the app launcher's main view.
235 235 APP_LAUNCH_APP_LIST_MAIN_CHROME,
236 // The extension id of the ChromeVox extension. 236
237 extern const char kChromeVoxExtensionId[]; 237 // User clicked the webstore icon from the app launcher's main view.
238 APP_LAUNCH_APP_LIST_MAIN_WEBSTORE,
239
240 // User clicked the chrome app icon from the app launcher's search view.
241 APP_LAUNCH_APP_LIST_SEARCH_CHROME,
242
243 // User clicked the webstore icon from the app launcher's search view.
244 APP_LAUNCH_APP_LIST_SEARCH_WEBSTORE,
245
246 APP_LAUNCH_BUCKET_BOUNDARY,
247 APP_LAUNCH_BUCKET_INVALID
248 };
249
250 // The extension id of the ChromeVox extension.
251 extern const char kChromeVoxExtensionId[];
238 252
239 #if defined(OS_CHROMEOS) 253 #if defined(OS_CHROMEOS)
240 // Path to preinstalled ChromeVox screen reader extension (relative to 254 // Path to preinstalled ChromeVox screen reader extension (relative to
241 // |chrome::DIR_RESOURCES|). 255 // |chrome::DIR_RESOURCES|).
242 extern const char kChromeVoxExtensionPath[]; 256 extern const char kChromeVoxExtensionPath[];
243 // Path to preinstalled Connectivity Diagnostics extension. 257 // Path to preinstalled Connectivity Diagnostics extension.
244 extern const char kConnectivityDiagnosticsPath[]; 258 extern const char kConnectivityDiagnosticsPath[];
245 extern const char kConnectivityDiagnosticsLauncherPath[]; 259 extern const char kConnectivityDiagnosticsLauncherPath[];
246 // Path to preinstalled speech synthesis extension. 260 // Path to preinstalled speech synthesis extension.
247 extern const char kSpeechSynthesisExtensionPath[]; 261 extern const char kSpeechSynthesisExtensionPath[];
248 // The extension id of the speech synthesis extension. 262 // The extension id of the speech synthesis extension.
249 extern const char kSpeechSynthesisExtensionId[]; 263 extern const char kSpeechSynthesisExtensionId[];
250 // The extension id of the wallpaper manager application. 264 // The extension id of the wallpaper manager application.
251 extern const char kWallpaperManagerId[]; 265 extern const char kWallpaperManagerId[];
252 // The extension id of the first run dialog application. 266 // The extension id of the first run dialog application.
253 extern const char kFirstRunDialogId[]; 267 extern const char kFirstRunDialogId[];
254 #endif 268 #endif
255 269
256 // What causes an extension to be installed? Used in histograms, so don't 270 // What causes an extension to be installed? Used in histograms, so don't
257 // change existing values. 271 // change existing values.
258 enum CrxInstallCause { 272 enum CrxInstallCause {
259 INSTALL_CAUSE_UNSET = 0, 273 INSTALL_CAUSE_UNSET = 0,
260 INSTALL_CAUSE_USER_DOWNLOAD, 274 INSTALL_CAUSE_USER_DOWNLOAD,
261 INSTALL_CAUSE_UPDATE, 275 INSTALL_CAUSE_UPDATE,
262 INSTALL_CAUSE_EXTERNAL_FILE, 276 INSTALL_CAUSE_EXTERNAL_FILE,
263 INSTALL_CAUSE_AUTOMATION, 277 INSTALL_CAUSE_AUTOMATION,
264 NUM_INSTALL_CAUSES 278 NUM_INSTALL_CAUSES
265 }; 279 };
266 280
267 // The states that an app can be in, as reported by chrome.app.installState 281 // The states that an app can be in, as reported by chrome.app.installState
268 // and chrome.app.runningState. 282 // and chrome.app.runningState.
269 extern const char kAppStateNotInstalled[]; 283 extern const char kAppStateNotInstalled[];
270 extern const char kAppStateInstalled[]; 284 extern const char kAppStateInstalled[];
271 extern const char kAppStateDisabled[]; 285 extern const char kAppStateDisabled[];
272 extern const char kAppStateRunning[]; 286 extern const char kAppStateRunning[];
273 extern const char kAppStateCannotRun[]; 287 extern const char kAppStateCannotRun[];
274 extern const char kAppStateReadyToRun[]; 288 extern const char kAppStateReadyToRun[];
275 289
276 // The path part of the file system url used for media file systems. 290 // The path part of the file system url used for media file systems.
277 extern const char kMediaFileSystemPathPart[]; 291 extern const char kMediaFileSystemPathPart[];
292
293 // NOTE: If you change this list, you should also change kExtensionIconSizes
294 // in cc file.
295 enum ExtensionIcons {
296 EXTENSION_ICON_GIGANTOR = 512,
297 EXTENSION_ICON_EXTRA_LARGE = 256,
298 EXTENSION_ICON_LARGE = 128,
299 EXTENSION_ICON_MEDIUM = 48,
300 EXTENSION_ICON_SMALL = 32,
301 EXTENSION_ICON_SMALLISH = 24,
302 EXTENSION_ICON_ACTION = 19,
303 EXTENSION_ICON_BITTY = 16,
304 EXTENSION_ICON_INVALID = 0,
305 };
306
307 // List of sizes for extension icons that can be defined in the manifest.
308 extern const int kExtensionIconSizes[];
309 extern const size_t kNumExtensionIconSizes;
310
311 // List of sizes for extension icons that can be defined in the manifest.
312 extern const int kExtensionActionIconSizes[];
313 extern const size_t kNumExtensionActionIconSizes;
278 314
279 } // namespace extension_misc 315 } // namespace extension_misc
280 316
281 namespace extensions { 317 namespace extensions {
282 318 // This enum is used for the launch type the user wants to use for an
283 // This enum is used for the launch type the user wants to use for an 319 // application.
284 // application. 320 // Do not remove items or re-order this enum as it is used in preferences
285 // Do not remove items or re-order this enum as it is used in preferences 321 // and histograms.
286 // and histograms. 322 enum LaunchType {
287 enum LaunchType { 323 LAUNCH_TYPE_INVALID = -1,
288 LAUNCH_TYPE_INVALID = -1, 324 LAUNCH_TYPE_FIRST = 0,
289 LAUNCH_TYPE_FIRST = 0, 325 LAUNCH_TYPE_PINNED = LAUNCH_TYPE_FIRST,
290 LAUNCH_TYPE_PINNED = LAUNCH_TYPE_FIRST, 326 LAUNCH_TYPE_REGULAR = 1,
291 LAUNCH_TYPE_REGULAR = 1, 327 LAUNCH_TYPE_FULLSCREEN = 2,
292 LAUNCH_TYPE_FULLSCREEN = 2, 328 LAUNCH_TYPE_WINDOW = 3,
293 LAUNCH_TYPE_WINDOW = 3, 329 NUM_LAUNCH_TYPES,
294 NUM_LAUNCH_TYPES, 330
295 331 // Launch an app in the in the way a click on the NTP would,
296 // Launch an app in the in the way a click on the NTP would, 332 // if no user pref were set. Update this constant to change
297 // if no user pref were set. Update this constant to change 333 // the default for the NTP and chrome.management.launchApp().
298 // the default for the NTP and chrome.management.launchApp(). 334 LAUNCH_TYPE_DEFAULT = LAUNCH_TYPE_REGULAR
299 LAUNCH_TYPE_DEFAULT = LAUNCH_TYPE_REGULAR 335 };
300 }; 336
301 337 // Don't remove items or change the order of this enum. It's used in
302 // Don't remove items or change the order of this enum. It's used in 338 // histograms and preferences.
303 // histograms and preferences. 339 enum LaunchContainer {
304 enum LaunchContainer { 340 LAUNCH_CONTAINER_WINDOW,
305 LAUNCH_CONTAINER_WINDOW, 341 LAUNCH_CONTAINER_PANEL,
306 LAUNCH_CONTAINER_PANEL, 342 LAUNCH_CONTAINER_TAB,
307 LAUNCH_CONTAINER_TAB, 343 // For platform apps, which don't actually have a container (they just get a
308 // For platform apps, which don't actually have a container (they just get a 344 // "onLaunched" event).
309 // "onLaunched" event). 345 LAUNCH_CONTAINER_NONE
310 LAUNCH_CONTAINER_NONE 346 };
311 };
312
313 } // namespace extensions 347 } // namespace extensions
314 348
315 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ 349 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698