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); | |
iclelland
2017/02/23 15:46:39
This code was moved recently, into third_party/Web
| |
54 } | |
55 } | 48 } |
56 } | 49 } |
57 | 50 |
58 namespace { | 51 namespace { |
59 | 52 |
60 InstallConditionalFeaturesFunction s_installConditionalFeaturesFunction = | 53 InstallConditionalFeaturesFunction s_installConditionalFeaturesFunction = |
61 &installConditionalFeaturesCore; | 54 &installConditionalFeaturesCore; |
62 } | 55 } |
63 | 56 |
64 InstallConditionalFeaturesFunction setInstallConditionalFeaturesFunction( | 57 InstallConditionalFeaturesFunction setInstallConditionalFeaturesFunction( |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 FeaturePolicy* featurePolicy = frame->securityContext()->getFeaturePolicy(); | 92 FeaturePolicy* featurePolicy = frame->securityContext()->getFeaturePolicy(); |
100 // The policy should always be initialized before checking it to ensure we | 93 // The policy should always be initialized before checking it to ensure we |
101 // properly inherit the parent policy. | 94 // properly inherit the parent policy. |
102 DCHECK(featurePolicy); | 95 DCHECK(featurePolicy); |
103 | 96 |
104 // Otherwise, check policy. | 97 // Otherwise, check policy. |
105 return featurePolicy->isFeatureEnabled(feature); | 98 return featurePolicy->isFeatureEnabled(feature); |
106 } | 99 } |
107 | 100 |
108 } // namespace blink | 101 } // namespace blink |
OLD | NEW |