1// Copyright 2013 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.
4
5#ifndef EXTENSIONS_COMMON_MANIFEST_CONSTANTS_H_
6#define EXTENSIONS_COMMON_MANIFEST_CONSTANTS_H_
7
8#include "build/build_config.h"
9
10namespace extensions {
11
12// Keys used in JSON representation of extensions.
13namespace manifest_keys {
14
15extern const char kAboutPage[];
16extern const char kAction[];
17extern const char kActionDefaultIcon[];
18extern const char kActionDefaultPopup[];
19extern const char kActionDefaultState[];
20extern const char kActionDefaultTitle[];
21extern const char kAllFrames[];
22extern const char kAltKey[];
23extern const char kApp[];
24extern const char kAppIconColor[];
25extern const char kAppThemeColor[];
26extern const char kAutomation[];
27extern const char kBackgroundAllowJsAccess[];
28extern const char kBackgroundPage[];
29extern const char kBackgroundPersistent[];
30extern const char kBackgroundScripts[];
31extern const char kBackgroundServiceWorkerScript[];
32extern const char kBluetooth[];
33extern const char kBookmarkUI[];
34extern const char kBrowserAction[];
35extern const char kBrowseURLs[];
36extern const char kChromeURLOverrides[];
37extern const char kCommands[];
38extern const char kContentCapabilities[];
39extern const char kContentScripts[];
40extern const char kContentSecurityPolicy[];
41extern const char kContentSecurityPolicy_ExtensionPagesPath[];
42extern const char kContentSecurityPolicy_IsolatedWorldPath[];
43extern const char kContentSecurityPolicy_SandboxedPagesPath[];
44extern const char kConvertedFromUserScript[];
45extern const char kCss[];
46extern const char kCtrlKey[];
47extern const char kCurrentLocale[];
48extern const char kDeclarativeNetRequestKey[];
49extern const char kDeclarativeRuleResourcesKey[];
50extern const char kDefaultLocale[];
51extern const char kDescription[];
52extern const char kDevToolsPage[];
53extern const char kDisplayInLauncher[];
54extern const char kDisplayInNewTabPage[];
55extern const char kEventName[];
56extern const char kExcludeGlobs[];
57extern const char kExcludeMatches[];
58extern const char kExport[];
59extern const char kExternallyConnectable[];
60extern const char kEventRules[];
61extern const char kFileAccessList[];
62extern const char kFileHandlers[];
63extern const char kFileHandlerExtensions[];
64extern const char kFileHandlerIncludeDirectories[];
65extern const char kFileHandlerTypes[];
66extern const char kFileHandlerVerb[];
67extern const char kFileFilters[];
68extern const char kFileBrowserHandlerId[];
69extern const char kFileBrowserHandlers[];
70extern const char kGlobal[];
71extern const char kHideBookmarkButton[];
72extern const char kHomepageURL[];
73extern const char kHostPermissions[];
74extern const char kIcons[];
75extern const char kId[];
76extern const char kImeOptionsPage[];
77extern const char kImport[];
78extern const char kIncognito[];
79extern const char kIncludeGlobs[];
80extern const char kIndicator[];
81extern const char kInputComponents[];
82extern const char kInputView[];
83extern const char kIsolation[];
84extern const char kJs[];
85extern const char kKey[];
86extern const char kKeycode[];
87extern const char kKiosk[];
88extern const char kKioskAlwaysUpdate[];
89extern const char kKioskEnabled[];
90extern const char kKioskOnly[];
91extern const char kKioskMode[];
92extern const char kKioskRequiredPlatformVersion[];
93extern const char kKioskSecondaryApps[];
94extern const char kLanguage[];
95extern const char kLaunch[];
96extern const char kLaunchContainer[];
97extern const char kLauncherPage[];
98extern const char kLauncherPagePage[];
99extern const char kLaunchHeight[];
100extern const char kLaunchLocalPath[];
101extern const char kLaunchWebURL[];
102extern const char kLaunchWidth[];
103extern const char kLayouts[];
104extern const char kLinkedAppIcons[];
105extern const char kLinkedAppIconURL[];
106extern const char kLinkedAppIconSize[];
107extern const char kManifestVersion[];
108extern const char kMatchAboutBlank[];
109extern const char kMatches[];
110extern const char kMIMETypes[];
111extern const char kMimeTypesHandler[];
112extern const char kMinimumChromeVersion[];
113extern const char kMinimumVersion[];
114extern const char kNaClModules[];
115extern const char kNaClModulesMIMEType[];
116extern const char kNaClModulesPath[];
117extern const char kName[];
118extern const char kOAuth2[];
119extern const char kOAuth2AutoApprove[];
120extern const char kOAuth2ClientId[];
121extern const char kOAuth2Scopes[];
122extern const char kOfflineEnabled[];
123extern const char kOmnibox[];
124extern const char kOmniboxKeyword[];
125extern const char kOptionalPermissions[];
126extern const char kOptionsPage[];
127extern const char kOptionsUI[];
128extern const char kOverrideHomepage[];
129extern const char kOverrideSearchProvider[];
130extern const char kOverrideStartupPage[];
131extern const char kPageAction[];
132extern const char kPermissions[];
133extern const char kPlatformAppBackground[];
134extern const char kPlatformAppBackgroundPage[];
135extern const char kPlatformAppBackgroundScripts[];
136extern const char kPlatformAppContentSecurityPolicy[];
137extern const char kPublicKey[];
138extern const char kReplacementWebApp[];
139extern const char kRemoveButton[];
140extern const char kRequirements[];
141extern const char kRunAt[];
142extern const char kSandboxedPages[];
143extern const char kSandboxedPagesCSP[];
144extern const char kSettingsOverride[];
145extern const char kSettingsOverrideAlternateUrls[];
146extern const char kSharedModuleAllowlist[];
147extern const char kSharedModuleLegacyAllowlist[];
148extern const char kShiftKey[];
149extern const char kShortcutKey[];
150extern const char kShortName[];
151extern const char kSignature[];
152extern const char kSockets[];
153extern const char kSpellcheck[];
154extern const char kSpellcheckDictionaryFormat[];
155extern const char kSpellcheckDictionaryLanguage[];
156extern const char kSpellcheckDictionaryLocale[];
157extern const char kSpellcheckDictionaryPath[];
158extern const char kStorageManagedSchema[];
159extern const char kSuggestedKey[];
160extern const char kSynthesizeExtensionAction[];
161extern const char kSystemIndicator[];
162extern const char kTheme[];
163extern const char kThemeColors[];
164extern const char kThemeDisplayProperties[];
165extern const char kThemeImages[];
166extern const char kThemeTints[];
167extern const char kTtsEngine[];
168extern const char kTtsVoices[];
169extern const char kTtsVoicesEventTypeEnd[];
170extern const char kTtsVoicesEventTypeError[];
171extern const char kTtsVoicesEventTypeMarker[];
172extern const char kTtsVoicesEventTypeSentence[];
173extern const char kTtsVoicesEventTypeStart[];
174extern const char kTtsVoicesEventTypeWord[];
175extern const char kTtsVoicesEventTypes[];
176extern const char kTtsVoicesGender[];
177extern const char kTtsVoicesLang[];
178extern const char kTtsVoicesRemote[];
179extern const char kTtsVoicesVoiceName[];
180extern const char kType[];
181extern const char kUIOverride[];
182extern const char kUpdateURL[];
183extern const char kUrlHandlers[];
184extern const char kUrlHandlerTitle[];
185extern const char kUsbPrinters[];
186extern const char kVersion[];
187extern const char kVersionName[];
188extern const char kWebAccessibleResources[];
189extern const char kWebURLs[];
190extern const char kWebview[];
191extern const char kWebviewName[];
192extern const char kWebviewAccessibleResources[];
193extern const char kWebviewPartitions[];
194#if defined(OS_CHROMEOS)
195extern const char kActionHandlers[];
196extern const char kActionHandlerActionKey[];
197extern const char kActionHandlerEnabledOnLockScreenKey[];
198extern const char kFileSystemProviderCapabilities[];
199#endif
200} // namespace manifest_keys
201
202// Some values expected in manifests.
203namespace manifest_values {
204
205extern const char kApiKey[];
206extern const char kBrowserActionCommandEvent[];
207extern const char kIncognitoNotAllowed[];
208extern const char kIncognitoSplit[];
209extern const char kIncognitoSpanning[];
210extern const char kIsolatedStorage[];
211extern const char kKeybindingPlatformChromeOs[];
212extern const char kKeybindingPlatformDefault[];
213extern const char kKeybindingPlatformLinux[];
214extern const char kKeybindingPlatformMac[];
215extern const char kKeybindingPlatformWin[];
216extern const char kKeyAlt[];
217extern const char kKeyShift[];
218extern const char kKeyCommand[];
219extern const char kKeyCtrl[];
220extern const char kKeyComma[];
221extern const char kKeyDel[];
222extern const char kKeyDown[];
223extern const char kKeyHome[];
224extern const char kKeyEnd[];
225extern const char kKeyIns[];
226extern const char kKeyLeft[];
227extern const char kKeyMacCtrl[];
228extern const char kKeyMediaNextTrack[];
229extern const char kKeyMediaPlayPause[];
230extern const char kKeyMediaPrevTrack[];
231extern const char kKeyMediaStop[];
232extern const char kKeyPgDwn[];
233extern const char kKeyPgUp[];
234extern const char kKeyPeriod[];
235extern const char kKeyRight[];
236extern const char kKeySearch[];
237extern const char kKeySeparator[];
238extern const char kKeySpace[];
239extern const char kKeyTab[];
240extern const char kKeyUp[];
241extern const char kLaunchContainerPanelDeprecated[];
242extern const char kLaunchContainerTab[];
243extern const char kLaunchContainerWindow[];
244extern const char kPageActionCommandEvent[];
245extern const char kRunAtDocumentEnd[];
246extern const char kRunAtDocumentIdle[];
247extern const char kRunAtDocumentStart[];
248
249} // namespace manifest_values
250
251// Error messages returned from extension installation.
252namespace manifest_errors {
253
254extern const char kActiveTabPermissionNotGranted[];
255extern const char kAllURLOrActiveTabNeeded[];
256extern const char kAppsNotEnabled[];
257extern const char kBackgroundPermissionNeeded[];
258extern const char kBackgroundPersistentInvalidForPlatformApps[];
259extern const char kBackgroundRequiredForPlatformApps[];
260extern const char kCannotAccessAboutUrl[];
261extern const char kCannotAccessChromeUrl[];
262extern const char kCannotAccessExtensionUrl[];
263extern const char kCannotAccessPage[];
264extern const char kCannotAccessPageWithUrl[];
265extern const char kCannotChangeExtensionID[];
266extern const char kCannotClaimAllHostsInExtent[];
267extern const char kCannotClaimAllURLsInExtent[];
268extern const char kCannotScriptGallery[];
269extern const char kCannotScriptNtp[];
270extern const char kCannotScriptSigninPage[];
271extern const char kCannotUninstallManagedExtension[];
272extern const char kChromeVersionTooLow[];
273extern const char kDeclarativeNetRequestPermissionNeeded[];
274extern const char kDefaultStateShouldNotBeSet[];
275extern const char kDevToolsExperimental[];
276extern const char kExpectString[];
277extern const char kFileNotFound[];
278extern const char kInvalidAboutPage[];
279extern const char kInvalidAboutPageExpectRelativePath[];
280extern const char kInvalidAction[];
281extern const char kInvalidActionDefaultIcon[];
282extern const char kInvalidActionDefaultPopup[];
283extern const char kInvalidActionDefaultState[];
284extern const char kInvalidActionDefaultTitle[];
285extern const char kInvalidAllFrames[];
286extern const char kInvalidAppIconColor[];
287extern const char kInvalidAppThemeColor[];
288extern const char kInvalidBackground[];
289extern const char kInvalidBackgroundAllowJsAccess[];
290extern const char kInvalidBackgroundCombination[];
291extern const char kInvalidBackgroundScript[];
292extern const char kInvalidBackgroundScripts[];
293extern const char kInvalidBackgroundServiceWorkerScript[];
294extern const char kInvalidBackgroundInHostedApp[];
295extern const char kInvalidBackgroundPersistent[];
296extern const char kInvalidBackgroundPersistentInPlatformApp[];
297extern const char kInvalidBackgroundPersistentNoPage[];
298extern const char kInvalidBrowserAction[];
299extern const char kInvalidBrowseURL[];
300extern const char kInvalidBrowseURLs[];
301extern const char kInvalidChromeURLOverrides[];
302extern const char kInvalidCommandsKey[];
303extern const char kInvalidContentCapabilities[];
304extern const char kInvalidContentCapabilitiesMatch[];
305extern const char kInvalidContentCapabilitiesMatchOrigin[];
306extern const char kInvalidContentCapabilitiesPermission[];
307extern const char kInvalidContentScript[];
308extern const char kInvalidContentScriptsList[];
309extern const char kInvalidCSPInsecureValueIgnored[];
310extern const char kInvalidCSPInsecureValueError[];
311extern const char kInvalidCSPMissingSecureSrc[];
312extern const char kInvalidCss[];
313extern const char kInvalidCssList[];
314extern const char kInvalidDeclarativeNetRequestKey[];
315extern const char kInvalidDeclarativeRulesFileKey[];
316extern const char kInvalidDefaultLocale[];
317extern const char kInvalidDescription[];
318extern const char kInvalidDevToolsPage[];
319extern const char kInvalidDisplayInLauncher[];
320extern const char kInvalidDisplayInNewTabPage[];
321extern const char kInvalidEmptyDictionary[];
322extern const char kInvalidExcludeMatch[];
323extern const char kInvalidExcludeMatches[];
324extern const char kInvalidExport[];
325extern const char kInvalidExportPermissions[];
326extern const char kInvalidExportAllowlist[];
327extern const char kInvalidExportAllowlistString[];
328extern const char kInvalidFileAccessList[];
329extern const char kInvalidFileAccessValue[];
330extern const char kInvalidFileBrowserHandler[];
331extern const char kInvalidFileBrowserHandlerId[];
332extern const char kInvalidFileBrowserHandlerMissingPermission[];
333extern const char kInvalidFileFiltersList[];
334extern const char kInvalidFileFilterValue[];
335extern const char kInvalidFileHandlers[];
336extern const char kInvalidFileHandlersHostedAppsNotSupported[];
337extern const char kInvalidFileHandlersTooManyTypesAndExtensions[];
338extern const char kInvalidFileHandlerExtension[];
339extern const char kInvalidFileHandlerExtensionElement[];
340extern const char kInvalidFileHandlerIncludeDirectories[];
341extern const char kInvalidFileHandlerNoTypeOrExtension[];
342extern const char kInvalidFileHandlerType[];
343extern const char kInvalidFileHandlerTypeElement[];
344extern const char kInvalidFileHandlerVerb[];
345extern const char kInvalidGlob[];
346extern const char kInvalidGlobList[];
347extern const char kInvalidHomepageOverrideURL[];
348extern const char kInvalidHomepageURL[];
349extern const char kInvalidHostPermission[];
350extern const char kInvalidHostPermissions[];
351extern const char kInvalidIconKey[];
352extern const char kInvalidIconPath[];
353extern const char kInvalidIcons[];
354extern const char kInvalidImport[];
355extern const char kInvalidImportAndExport[];
356extern const char kInvalidImportId[];
357extern const char kInvalidImportVersion[];
358extern const char kInvalidIncognitoBehavior[];
359extern const char kInvalidInputComponents[];
360extern const char kInvalidInputComponentDescription[];
361extern const char kInvalidInputComponentLayoutName[];
362extern const char kInvalidInputComponentName[];
363extern const char kInvalidInputComponentShortcutKey[];
364extern const char kInvalidInputComponentShortcutKeycode[];
365extern const char kInvalidInputComponentType[];
366extern const char kInvalidInputView[];
367extern const char kInvalidIsolation[];
368extern const char kInvalidIsolationValue[];
369extern const char kInvalidJs[];
370extern const char kInvalidJsList[];
371extern const char kInvalidKey[];
372extern const char kInvalidKeyBinding[];
373extern const char kInvalidKeyBindingDescription[];
374extern const char kInvalidKeyBindingDictionary[];
375extern const char kInvalidKeyBindingMediaKeyWithModifier[];
376extern const char kInvalidKeyBindingMissingPlatform[];
377extern const char kInvalidKeyBindingTooMany[];
378extern const char kInvalidKeyBindingUnknownPlatform[];
379extern const char kInvalidKioskAlwaysUpdate[];
380extern const char kInvalidKioskEnabled[];
381extern const char kInvalidKioskOnly[];
382extern const char kInvalidKioskOnlyButNotEnabled[];
383extern const char kInvalidKioskRequiredPlatformVersion[];
384extern const char kInvalidKioskSecondaryApps[];
385extern const char kInvalidKioskSecondaryAppsBadAppEntry[];
386extern const char kInvalidKioskSecondaryAppsDuplicateApp[];
387extern const char kInvalidKioskSecondaryAppsPropertyUnavailable[];
388extern const char kInvalidLauncherPage[];
389extern const char kInvalidLauncherPagePage[];
390extern const char kInvalidLaunchContainer[];
391extern const char kInvalidLaunchValue[];
392extern const char kInvalidLaunchValueContainer[];
393extern const char kInvalidLinkedAppIcon[];
394extern const char kInvalidLinkedAppIconSize[];
395extern const char kInvalidLinkedAppIconURL[];
396extern const char kInvalidLinkedAppIcons[];
397extern const char kInvalidManifest[];
398extern const char kInvalidManifestKey[];
399extern const char kInvalidManifestVersion[];
400extern const char kInvalidManifestVersionOld[];
401extern const char kInvalidMatch[];
402extern const char kInvalidMatchAboutBlank[];
403extern const char kInvalidMatchCount[];
404extern const char kInvalidMatches[];
405extern const char kInvalidMIMETypes[];
406extern const char kInvalidMimeTypesHandler[];
407extern const char kInvalidMinimumChromeVersion[];
408extern const char kInvalidNaClModules[];
409extern const char kInvalidNaClModulesMIMEType[];
410extern const char kInvalidNaClModulesPath[];
411extern const char kInvalidName[];
412extern const char kInvalidOAuth2AutoApprove[];
413extern const char kInvalidOAuth2ClientId[];
414extern const char kInvalidOAuth2Scopes[];
415extern const char kInvalidOfflineEnabled[];
416extern const char kInvalidOmniboxKeyword[];
417extern const char kInvalidOptionsUIChromeStyle[];
418extern const char kInvalidOptionsUIOpenInTab[];
419extern const char kInvalidOptionsPage[];
420extern const char kInvalidOptionsPageExpectUrlInPackage[];
421extern const char kInvalidOptionsPageInHostedApp[];
422extern const char kInvalidPageAction[];
423extern const char kInvalidPermissionWithDetail[];
424extern const char kInvalidPermission[];
425extern const char kInvalidPermissions[];
426extern const char kInvalidPermissionScheme[];
427extern const char kInvalidReplacementWebApp[];
428extern const char kInvalidRequirement[];
429extern const char kInvalidRequirements[];
430extern const char kInvalidRunAt[];
431extern const char kInvalidSandboxedPagesList[];
432extern const char kInvalidSandboxedPage[];
433extern const char kInvalidSearchEngineMissingKeys[];
434extern const char kInvalidSearchEngineURL[];
435extern const char kInvalidShortName[];
436extern const char kInvalidSignature[];
437extern const char kInvalidSpellcheck[];
438extern const char kInvalidSpellcheckDictionaryFormat[];
439extern const char kInvalidSpellcheckDictionaryLanguage[];
440extern const char kInvalidSpellcheckDictionaryLocale[];
441extern const char kInvalidSpellcheckDictionaryPath[];
442extern const char kInvalidStartupOverrideURL[];
443extern const char kInvalidSystemIndicator[];
444extern const char kInvalidTheme[];
445extern const char kInvalidThemeColorAppType[];
446extern const char kInvalidThemeColors[];
447extern const char kInvalidThemeImages[];
448extern const char kInvalidThemeImagesMissing[];
449extern const char kInvalidThemeTints[];
450extern const char kInvalidTts[];
451extern const char kInvalidTtsVoices[];
452extern const char kInvalidTtsVoicesEventTypes[];
453extern const char kInvalidTtsVoicesGender[];
454extern const char kInvalidTtsVoicesLang[];
455extern const char kInvalidTtsVoicesRemote[];
456extern const char kInvalidTtsVoicesVoiceName[];
457extern const char kInvalidUpdateURL[];
458extern const char kInvalidURLPatternError[];
459extern const char kInvalidURLHandlers[];
460extern const char kInvalidURLHandlerPatternElement[];
461extern const char kInvalidURLHandlerTitle[];
462extern const char kInvalidURLHandlerPattern[];
463extern const char kInvalidVersion[];
464extern const char kInvalidVersionName[];
465extern const char kInvalidWebAccessibleResourcesList[];
466extern const char kInvalidWebAccessibleResource[];
467extern const char kInvalidWebview[];
468extern const char kInvalidWebviewAccessibleResourcesList[];
469extern const char kInvalidWebviewAccessibleResource[];
470extern const char kInvalidWebviewPartition[];
471extern const char kInvalidWebviewPartitionName[];
472extern const char kInvalidWebviewPartitionsList[];
473extern const char kInvalidWebURL[];
474extern const char kInvalidWebURLs[];
475extern const char kInvalidZipHash[];
476extern const char kKeyIsDeprecatedWithReplacement[];
477extern const char kLauncherPagePageRequired[];
478extern const char kLaunchPathAndExtentAreExclusive[];
479extern const char kLaunchPathAndURLAreExclusive[];
480extern const char kLaunchURLRequired[];
481extern const char kLocalesInvalidLocale[];
482extern const char kLocalesMessagesFileMissing[];
483extern const char kLocalesNoDefaultMessages[];
484extern const char kLocalesNoValidLocaleNamesListed[];
485extern const char kLocalesTreeMissing[];
486extern const char kManifestParseError[];
487extern const char kManifestUnreadable[];
488extern const char kManifestVersionTooHighWarning[];
489extern const char kMissingFile[];
490extern const char kMultipleOverrides[];
491extern const char kNoWildCardsInPaths[];
492extern const char kNPAPIPluginsNotSupported[];
493extern const char kOneUISurfaceOnly[];
494extern const char kPageCaptureNeeded[];
495extern const char kPermissionMarkedOptionalAndRequired[];
496extern const char kPermissionMustBeOptional[];
497extern const char kPermissionNotAllowed[];
498extern const char kPermissionNotAllowedInManifest[];
499extern const char kPermissionUnknownOrMalformed[];
500extern const char kPluginsRequirementDeprecated[];
501extern const char kReservedMessageFound[];
502extern const char kSandboxPagesCSPKeyNotAllowed[];
503extern const char kRulesFileIsInvalid[];
504extern const char kTtsGenderIsDeprecated[];
505extern const char kUnrecognizedManifestKey[];
506extern const char kUnrecognizedManifestProperty[];
507extern const char kUrlHandlersInHostedApps[];
508extern const char kWebRequestConflictsWithLazyBackground[];
509#if defined(OS_CHROMEOS)
510extern const char kDuplicateActionHandlerFound[];
511extern const char kIllegalPlugins[];
512extern const char kInvalidActionHandlerDictionary[];
513extern const char kInvalidActionHandlersActionType[];
514extern const char kInvalidActionHandlersType[];
515extern const char kInvalidFileSystemProviderMissingCapabilities[];
516extern const char kInvalidFileSystemProviderMissingPermission[];
517#endif
518
519} // namespace manifest_errors
520
521} // namespace extensions
522
523#endif // EXTENSIONS_COMMON_MANIFEST_CONSTANTS_H_
524