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
3 // found in the LICENSE file.
5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_
10 #include "base/basictypes.h"
11 #include "base/files/file_path.h"
14 namespace extension_urls
{
16 // This returns the compile-time constant webstore update url specific to
17 // Chrome. Usually you should prefer using GetWebstoreUpdateUrl.
18 GURL
GetDefaultWebstoreUpdateUrl();
20 // Field to use with webstore URL for tracking launch source.
21 extern const char kWebstoreSourceField
[];
23 // Values to use with webstore URL launch source field.
24 extern const char kLaunchSourceAppList
[];
25 extern const char kLaunchSourceAppListSearch
[];
26 extern const char kLaunchSourceAppListInfoDialog
[];
28 } // namespace extension_urls
30 namespace extension_misc
{
32 // The extension id of the bookmark manager.
33 extern const char kBookmarkManagerId
[];
35 // The extension id of the Chrome component application.
36 extern const char kChromeAppId
[];
38 // The extension id of the Cloud Print component application.
39 extern const char kCloudPrintAppId
[];
41 // The extension id of the Data Saver extension.
42 extern const char kDataSaverExtensionId
[];
44 // The extension id of the Drive extension.
45 extern const char kDriveExtensionId
[];
47 // The extension id of the Drive hosted app.
48 extern const char kDriveHostedAppId
[];
50 // The extension id of the Easy Unlock component application.
51 extern const char kEasyUnlockAppId
[];
53 // The extension id of the Enterprise Web Store component application.
54 extern const char kEnterpriseWebStoreAppId
[];
56 // The extension id of GMail application.
57 extern const char kGmailAppId
[];
59 // The extension id of the Google Doc application.
60 extern const char kGoogleDocAppId
[];
62 // The extension id of the Google Play Music application.
63 extern const char kGooglePlayMusicAppId
[];
65 // The extension id of the Google Search application.
66 extern const char kGoogleSearchAppId
[];
68 // The extension id of the Google Sheets application.
69 extern const char kGoogleSheetsAppId
[];
71 // The extension id of the Google Slides application.
72 extern const char kGoogleSlidesAppId
[];
74 // The extension id of the HTerm app for ChromeOS.
75 extern const char kHTermAppId
[];
77 // The extension id of the HTerm dev app for ChromeOS.
78 extern const char kHTermDevAppId
[];
80 // The extension id of the Identity API UI application.
81 extern const char kIdentityApiUiAppId
[];
83 // The extension id of the Crosh component app for ChromeOS.
84 extern const char kCroshBuiltinAppId
[];
86 // The extension id of the hotword audio verification dialogue app.
87 extern const char kHotwordAudioVerificationAppId
[];
89 // The extension id of the new (experimental) hotword extension.
90 extern const char kHotwordNewExtensionId
[];
92 // The extension id of the hotword shared module.
93 extern const char kHotwordSharedModuleId
[];
95 // The extension id of the settings application.
96 extern const char kSettingsAppId
[];
98 // The extension id of the Youtube application.
99 extern const char kYoutubeAppId
[];
101 // The extension id of the in-app payments support application.
102 extern const char kInAppPaymentsSupportAppId
[];
104 #if defined(ENABLE_MEDIA_ROUTER)
105 // The extension id of the stable media router extension.
106 extern const char kMediaRouterStableExtensionId
[];
107 #endif // defined(ENABLE_MEDIA_ROUTER)
109 // The buckets used for app launches.
110 enum AppLaunchBucket
{
111 // Launch from NTP apps section while maximized.
112 APP_LAUNCH_NTP_APPS_MAXIMIZED
,
114 // Launch from NTP apps section while collapsed.
115 APP_LAUNCH_NTP_APPS_COLLAPSED
,
117 // Launch from NTP apps section while in menu mode.
118 APP_LAUNCH_NTP_APPS_MENU
,
120 // Launch from NTP most visited section in any mode.
121 APP_LAUNCH_NTP_MOST_VISITED
,
123 // Launch from NTP recently closed section in any mode.
124 APP_LAUNCH_NTP_RECENTLY_CLOSED
,
126 // App link clicked from bookmark bar.
127 APP_LAUNCH_BOOKMARK_BAR
,
129 // Nvigated to an app from within a web page (like by clicking a link).
130 APP_LAUNCH_CONTENT_NAVIGATION
,
132 // Launch from session restore.
133 APP_LAUNCH_SESSION_RESTORE
,
135 // Autolaunched at startup, like for pinned tabs.
136 APP_LAUNCH_AUTOLAUNCH
,
138 // Launched from omnibox app links.
139 APP_LAUNCH_OMNIBOX_APP
,
141 // App URL typed directly into the omnibox (w/ instant turned off).
142 APP_LAUNCH_OMNIBOX_LOCATION
,
144 // Navigate to an app URL via instant.
145 APP_LAUNCH_OMNIBOX_INSTANT
,
147 // Launch via chrome.management.launchApp.
148 APP_LAUNCH_EXTENSION_API
,
150 // Launch an app via a shortcut. This includes using the --app or --app-id
151 // command line arguments, or via an app shim process on Mac.
152 APP_LAUNCH_CMD_LINE_APP
,
154 // App launch by passing the URL on the cmd line (not using app switches).
155 APP_LAUNCH_CMD_LINE_URL
,
157 // User clicked web store launcher on NTP.
158 APP_LAUNCH_NTP_WEBSTORE
,
160 // App launched after the user re-enabled it on the NTP.
161 APP_LAUNCH_NTP_APP_RE_ENABLE
,
163 // URL launched using the --app cmd line option, but the URL does not
164 // correspond to an installed app. These launches are left over from a
165 // feature that let you make desktop shortcuts from the file menu.
166 APP_LAUNCH_CMD_LINE_APP_LEGACY
,
168 // User clicked web store link on the NTP footer.
169 APP_LAUNCH_NTP_WEBSTORE_FOOTER
,
171 // User clicked [+] icon in apps page.
172 APP_LAUNCH_NTP_WEBSTORE_PLUS_ICON
,
174 // User clicked icon in app launcher main view.
175 APP_LAUNCH_APP_LIST_MAIN
,
177 // User clicked app launcher search result.
178 APP_LAUNCH_APP_LIST_SEARCH
,
180 // User clicked the chrome app icon from the app launcher's main view.
181 APP_LAUNCH_APP_LIST_MAIN_CHROME
,
183 // User clicked the webstore icon from the app launcher's main view.
184 APP_LAUNCH_APP_LIST_MAIN_WEBSTORE
,
186 // User clicked the chrome app icon from the app launcher's search view.
187 APP_LAUNCH_APP_LIST_SEARCH_CHROME
,
189 // User clicked the webstore icon from the app launcher's search view.
190 APP_LAUNCH_APP_LIST_SEARCH_WEBSTORE
,
191 APP_LAUNCH_BUCKET_BOUNDARY
,
192 APP_LAUNCH_BUCKET_INVALID
195 // The extension id of the ChromeVox extension.
196 extern const char kChromeVoxExtensionId
[];
198 #if defined(OS_CHROMEOS)
199 // Path to preinstalled ChromeVox screen reader extension (relative to
200 // |chrome::DIR_RESOURCES|).
201 extern const char kChromeVoxExtensionPath
[];
202 // Name of the manifest file in an extension when a special manifest is used
204 extern const char kGuestManifestFilename
[];
205 // Extension id, path (relative to |chrome::DIR_RESOURCES|) and IME engine
206 // id for the builtin-in Braille IME extension.
207 extern const char kBrailleImeExtensionId
[];
208 extern const char kBrailleImeExtensionPath
[];
209 extern const char kBrailleImeEngineId
[];
210 // Path to preinstalled Connectivity Diagnostics extension.
211 extern const char kConnectivityDiagnosticsPath
[];
212 extern const char kConnectivityDiagnosticsLauncherPath
[];
213 // The extension id of the first run dialog application.
214 extern const char kFirstRunDialogId
[];
215 // Path to preinstalled speech synthesis extension.
216 extern const char kSpeechSynthesisExtensionPath
[];
217 // The extension id of the speech synthesis extension.
218 extern const char kSpeechSynthesisExtensionId
[];
219 // The extension id of the wallpaper manager application.
220 extern const char kWallpaperManagerId
[];
221 // The app id of the webstore widget component app.
222 extern const char kWebstoreWidgetAppId
[];
223 // The extension id of the new ZIP unpacker extension.
224 extern const char kZIPUnpackerExtensionId
[];
227 // What causes an extension to be installed? Used in histograms, so don't
228 // change existing values.
229 enum CrxInstallCause
{
230 INSTALL_CAUSE_UNSET
= 0,
231 INSTALL_CAUSE_USER_DOWNLOAD
,
232 INSTALL_CAUSE_UPDATE
,
233 INSTALL_CAUSE_EXTERNAL_FILE
,
234 INSTALL_CAUSE_AUTOMATION
,
238 // The states that an app can be in, as reported by chrome.app.installState
239 // and chrome.app.runningState.
240 extern const char kAppStateNotInstalled
[];
241 extern const char kAppStateInstalled
[];
242 extern const char kAppStateDisabled
[];
243 extern const char kAppStateRunning
[];
244 extern const char kAppStateCannotRun
[];
245 extern const char kAppStateReadyToRun
[];
247 // The path part of the file system url used for media file systems.
248 extern const char kMediaFileSystemPathPart
[];
250 // The key used for signing some pieces of data from the webstore.
251 extern const uint8 kWebstoreSignaturesPublicKey
[];
252 extern const int kWebstoreSignaturesPublicKeySize
;
254 } // namespace extension_misc
256 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_