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 #ifndef ConditionalFeatures_h | 5 #ifndef ConditionalFeatures_h |
6 #define ConditionalFeatures_h | 6 #define ConditionalFeatures_h |
7 | 7 |
8 #include "bindings/core/v8/DOMWrapperWorld.h" | 8 #include "bindings/core/v8/DOMWrapperWorld.h" |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "platform/feature_policy/FeaturePolicy.h" | 10 #include "platform/feature_policy/FeaturePolicy.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 v8::Local<v8::Object>, | 29 v8::Local<v8::Object>, |
30 v8::Local<v8::Function>); | 30 v8::Local<v8::Function>); |
31 | 31 |
32 // Sets the function to be called by |installConditionalFeatures|. The function | 32 // Sets the function to be called by |installConditionalFeatures|. The function |
33 // is initially set to the private |installConditionalFeaturesCore| function, | 33 // is initially set to the private |installConditionalFeaturesCore| function, |
34 // but can be overridden by this function. A pointer to the previously set | 34 // but can be overridden by this function. A pointer to the previously set |
35 // function is returned, so that functions can be chained. | 35 // function is returned, so that functions can be chained. |
36 CORE_EXPORT InstallConditionalFeaturesFunction | 36 CORE_EXPORT InstallConditionalFeaturesFunction |
37 setInstallConditionalFeaturesFunction(InstallConditionalFeaturesFunction); | 37 setInstallConditionalFeaturesFunction(InstallConditionalFeaturesFunction); |
38 | 38 |
| 39 // Installs all of the conditionally enabled V8 bindings on the Window object. |
| 40 // This is called separately from other objects so that attributes and |
| 41 // interfaces which need to be visible on the global object are installed even |
| 42 // when the V8 context is reused (i.e., after navigation) |
| 43 CORE_EXPORT void installPendingConditionalFeaturesOnWindow(const ScriptState*); |
| 44 |
39 bool isFeatureEnabledInFrame(const FeaturePolicy::Feature&, const LocalFrame*); | 45 bool isFeatureEnabledInFrame(const FeaturePolicy::Feature&, const LocalFrame*); |
40 | 46 |
41 } // namespace blink | 47 } // namespace blink |
42 | 48 |
43 #endif // ConditionalFeatures_h | 49 #endif // ConditionalFeatures_h |
OLD | NEW |