-
Notifications
You must be signed in to change notification settings - Fork 127
Expand file tree
/
Copy pathcontent_feature_map.cc
More file actions
100 lines (90 loc) · 4.07 KB
/
Copy pathcontent_feature_map.cc
File metadata and controls
100 lines (90 loc) · 4.07 KB
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
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/android/feature_map.h"
#include "base/feature_list.h"
#include "base/no_destructor.h"
#include "components/input/features.h"
#include "content/common/features.h"
#include "content/public/common/content_features.h"
#include "media/base/media_switches.h"
#include "third_party/blink/public/common/features.h"
#include "ui/accessibility/accessibility_features.h"
// Must come after all headers that specialize FromJniType() / ToJniType().
#include "content/public/android/content_main_dex_jni/ContentFeatureMap_jni.h"
namespace content::android {
namespace {
// Array of features exposed through the Java ContentFeatureMap API. Entries in
// this array may either refer to features defined in the header of this file or
// in other locations in the code base (e.g. content_features.h).
const base::Feature* const kFeaturesExposedToJava[] = {
&blink::features::kAndroidDesktopWebPrefsLargeDisplays,
&blink::features::kAndroidSpellcheckFullApiBlink,
&blink::features::kDevicePosture,
&blink::features::kViewportSegments,
&media::kAllowDelayedAudioFocusGainAndroid,
&media::kAndroidEnableBackgroundMediaCapturing,
&input::features::kInputOnViz,
&features::kAndroidCaptureKeyEvents,
&features::kAndroidDevToolsFrontend,
&features::kAccessibilityCheckJavaNodeCacheFreshness,
&features::kAccessibilityAtomicLiveRegions,
&features::kAccessibilityDeprecateJavaNodeCache,
&features::kAccessibilityDeprecateTypeAnnounce,
&features::kAccessibilityExposeNonAtomicTextFieldChildren,
&features::kAccessibilityExpandEventMetadata,
&features::kAccessibilityExtendedSelection,
&features::kAccessibilityImeGetFormattedText,
&features::kAccessibilityImproveLiveRegionAnnounce,
&features::kAccessibilityMagnificationFollowsFocusKeyboardAttached,
&features::kAccessibilityMagnificationFollowsFocusNoKeyboard,
&features::kAccessibilityRequestLayoutBasedActions,
&features::kAccessibilityRequestScopedContentChangedEvents,
&features::kAccessibilityPageZoomV2,
&features::kAccessibilityPopulateSupplementalDescriptionApi,
&features::kAccessibilitySequentialFocus,
&features::kAccessibilitySetSelectableOnAllNodesWithText,
&features::kAccessibilityUnifiedSnapshots,
&features::kAccessibilityManageBroadcastReceiverOnBackground,
&features::kAndroidDesktopZoomScaling,
&features::kAndroidFallbackToNextSlot,
&features::kAndroidForceTextInputStateUpdateUponFocus,
&features::kAndroidMediaInsertion,
&features::kAndroidPkAutocorrectUnderline,
&features::kAndroidPkAutocorrectUnderlineV2,
&features::kAndroidRemoveSetLocalFocusWorkaroundOnBaklava,
&features::kAndroidBlockMisspellingSuggestionSpanInCompositionMode,
&features::kAndroidBlockGrammarSuggestionSpanInCompositionMode,
&features::kStrictHighRankProcessLRU,
&features::kFedCm,
&features::kFedCmNativeIdPs,
&features::kHidePastePopupOnGSB,
&features::kNoSelectionMenuCaching,
&features::kPrefetchOffTheMainThread,
&features::kPreviewHandwritingGesture,
&features::kReduceGpuPriorityOnBackground,
&features::kContinueGestureOnLosingFocus,
&features::kSandboxedProcessServiceLimitOnAndroid,
&features::kScrollAfterOSKViewportShrinkFix,
&features::kSmartZoom,
&features::kTouchDragAndContextMenu,
&features::kWebBluetoothNewPermissionsBackend,
&features::kWebContentsDiscard,
&features::kWebIdentityDigitalCredentials,
&features::kTextClassifierTimeout,
&features::kJavalessRendererExperimentOn,
&features::kBtmTtl,
&features::kSpareRendererProcessPriority,
};
// static
base::android::FeatureMap* GetFeatureMap() {
static base::NoDestructor<base::android::FeatureMap> kFeatureMap(
kFeaturesExposedToJava);
return kFeatureMap.get();
}
} // namespace
static int64_t JNI_ContentFeatureMap_GetNativeMap(JNIEnv* env) {
return reinterpret_cast<int64_t>(GetFeatureMap());
}
} // namespace content::android
DEFINE_JNI(ContentFeatureMap)