summaryrefslogtreecommitdiffstats
path: root/chromium/extensions/common/extension_features.h
blob: d2fd6066a26cef22c2294d91b9dd3cbb4b230d86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef EXTENSIONS_COMMON_EXTENSION_FEATURES_H_
#define EXTENSIONS_COMMON_EXTENSION_FEATURES_H_

#include "base/feature_list.h"

namespace extensions_features {

///////////////////////////////////////////////////////////////////////////////
// README!
// * Please keep these features alphabetized. One exception: API features go
//   at the top so that they are visibly grouped together.
// * Adding a new feature for an extension API? Great!
//   Please use the naming style `kApi<Namespace><Method>`, e.g.
//   `kApiTabsCreate`.
//   Note that if you are using the features.json files to restrict your
//   API with the feature (which is usually best practice if you are introducing
//   any new features), you will also have to add the feature entry to the list
//   in extensions/common/features/feature_flags.cc so the features system can
//   detect it.
// * Naming Tips: Even though this file is unique to extensions, base::Features
//   have to be globally unique. Thus, it's often best to give features very
//   specific names (often including "Extension", unlike many C++ class names)
//   since namespacing doesn't otherwise exist.
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
// API Features
///////////////////////////////////////////////////////////////////////////////

// NOTE(devlin): If there are consistently enough of these in flux, it might
// make sense to have their own file.

BASE_DECLARE_FEATURE(kApiAccessibilityServicePrivate);
BASE_DECLARE_FEATURE(kApiReadingList);
BASE_DECLARE_FEATURE(kApiRuntimeGetContexts);
BASE_DECLARE_FEATURE(kApiSidePanelOpen);
BASE_DECLARE_FEATURE(kApiUserScripts);
BASE_DECLARE_FEATURE(kRestrictFileURLNavigation);

///////////////////////////////////////////////////////////////////////////////
// Other Features
///////////////////////////////////////////////////////////////////////////////

// For historical reasons, this includes some APIs. Please don't add more.

BASE_DECLARE_FEATURE(kAllowSharedArrayBuffersUnconditionally);

BASE_DECLARE_FEATURE(kAllowWithholdingExtensionPermissionsOnInstall);

BASE_DECLARE_FEATURE(kAvoidEarlyExtensionScriptContextCreation);

BASE_DECLARE_FEATURE(kCheckingNoExtensionIdInExtensionIpcs);

BASE_DECLARE_FEATURE(kContentScriptsMatchOriginAsFallback);

BASE_DECLARE_FEATURE(kExtensionDynamicURLRedirection);

BASE_DECLARE_FEATURE(kExtensionSidePanelIntegration);

BASE_DECLARE_FEATURE(kExtensionSourceUrlEnforcement);

BASE_DECLARE_FEATURE(kExtensionWebFileHandlers);

BASE_DECLARE_FEATURE(kExtensionsManifestV3Only);

BASE_DECLARE_FEATURE(kExtensionsMenuAccessControl);

BASE_DECLARE_FEATURE(kExtensionsMenuAccessControlWithPermittedSites);

BASE_DECLARE_FEATURE(kForceWebRequestProxyForTest);

BASE_DECLARE_FEATURE(kLaunchWindowsNativeHostsDirectly);

BASE_DECLARE_FEATURE(kNewExtensionFaviconHandling);

BASE_DECLARE_FEATURE(kNewWebstoreDomain);

BASE_DECLARE_FEATURE(kReportKeepaliveUkm);

BASE_DECLARE_FEATURE(kRestrictDeveloperModeAPIs);

BASE_DECLARE_FEATURE(kSafeBrowsingCrxAllowlistAutoDisable);

BASE_DECLARE_FEATURE(kSafeBrowsingCrxAllowlistShowWarnings);

BASE_DECLARE_FEATURE(kStructuredCloningForMV3Messaging);

BASE_DECLARE_FEATURE(kTelemetryExtensionPendingApprovalApi);

BASE_DECLARE_FEATURE(kWebviewTagMPArchBehavior);

///////////////////////////////////////////////////////////////////////////////
// STOP!
// Please don't just add your new feature down here.
// See the guidance at the top of this file.
///////////////////////////////////////////////////////////////////////////////

BASE_DECLARE_FEATURE(kExtensionsZipFileInstalledInProfileDir);

}  // namespace extensions_features

#endif  // EXTENSIONS_COMMON_EXTENSION_FEATURES_H_