OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "bindings/core/v8/ConditionalFeatures.h" | 5 #include "bindings/core/v8/ConditionalFeatures.h" |
6 | 6 |
7 #include "bindings/core/v8/ScriptState.h" | 7 #include "bindings/core/v8/ScriptState.h" |
8 #include "bindings/core/v8/V8Document.h" | 8 #include "bindings/core/v8/V8Document.h" |
9 #include "bindings/core/v8/V8HTMLLinkElement.h" | 9 #include "bindings/core/v8/V8HTMLLinkElement.h" |
10 #include "bindings/core/v8/V8Navigator.h" | 10 #include "bindings/core/v8/V8Navigator.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 interfaceObject); | 38 interfaceObject); |
39 } | 39 } |
40 } else if (wrapperTypeInfo == &V8Window::wrapperTypeInfo) { | 40 } else if (wrapperTypeInfo == &V8Window::wrapperTypeInfo) { |
41 v8::Local<v8::Object> instanceObject = scriptState->context()->Global(); | 41 v8::Local<v8::Object> instanceObject = scriptState->context()->Global(); |
42 if (RuntimeEnabledFeatures::longTaskObserverEnabled() || | 42 if (RuntimeEnabledFeatures::longTaskObserverEnabled() || |
43 (originTrialContext && | 43 (originTrialContext && |
44 originTrialContext->isTrialEnabled("LongTaskObserver"))) { | 44 originTrialContext->isTrialEnabled("LongTaskObserver"))) { |
45 V8Window::installLongTaskObserver(isolate, world, instanceObject, | 45 V8Window::installLongTaskObserver(isolate, world, instanceObject, |
46 prototypeObject, interfaceObject); | 46 prototypeObject, interfaceObject); |
47 } | 47 } |
| 48 } else if (wrapperTypeInfo == &V8Document::wrapperTypeInfo) { |
| 49 if (RuntimeEnabledFeatures::setRootScrollerEnabled() || |
| 50 (originTrialContext && |
| 51 originTrialContext->isTrialEnabled("RootScroller"))) { |
| 52 V8Document::installRootScroller(isolate, world, v8::Local<v8::Object>(), |
| 53 prototypeObject, interfaceObject); |
| 54 } |
48 } | 55 } |
49 } | 56 } |
50 | 57 |
51 namespace { | 58 namespace { |
52 | 59 |
53 InstallConditionalFeaturesFunction s_installConditionalFeaturesFunction = | 60 InstallConditionalFeaturesFunction s_installConditionalFeaturesFunction = |
54 &installConditionalFeaturesCore; | 61 &installConditionalFeaturesCore; |
55 } | 62 } |
56 | 63 |
57 InstallConditionalFeaturesFunction setInstallConditionalFeaturesFunction( | 64 InstallConditionalFeaturesFunction setInstallConditionalFeaturesFunction( |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 FeaturePolicy* featurePolicy = frame->securityContext()->getFeaturePolicy(); | 99 FeaturePolicy* featurePolicy = frame->securityContext()->getFeaturePolicy(); |
93 // The policy should always be initialized before checking it to ensure we | 100 // The policy should always be initialized before checking it to ensure we |
94 // properly inherit the parent policy. | 101 // properly inherit the parent policy. |
95 DCHECK(featurePolicy); | 102 DCHECK(featurePolicy); |
96 | 103 |
97 // Otherwise, check policy. | 104 // Otherwise, check policy. |
98 return featurePolicy->isFeatureEnabled(feature); | 105 return featurePolicy->isFeatureEnabled(feature); |
99 } | 106 } |
100 | 107 |
101 } // namespace blink | 108 } // namespace blink |
OLD | NEW |