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