Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/ConditionalFeaturesForCore.h |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ConditionalFeaturesForCore.h b/third_party/WebKit/Source/bindings/core/v8/ConditionalFeaturesForCore.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ab5d4116ac17865f36807546d9911736a7e83651 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/bindings/core/v8/ConditionalFeaturesForCore.h |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ConditionalFeaturesForCore_h |
| +#define ConditionalFeaturesForCore_h |
| + |
| +#include <v8.h> |
| +#include "core/CoreExport.h" |
| +#include "platform/feature_policy/FeaturePolicy.h" |
| +#include "wtf/text/WTFString.h" |
|
Yuki
2017/02/20 09:34:29
nit: No need to include WTFString.h.
|
| + |
| +namespace blink { |
| + |
| +class LocalFrame; |
| +class ScriptState; |
| + |
| +// Installs all of the conditionally enabled V8 bindings on the Window object. |
| +// This is called separately from other objects so that attributes and |
| +// interfaces which need to be visible on the global object are installed even |
| +// when the V8 context is reused (i.e., after navigation) |
| +CORE_EXPORT void installConditionalFeaturesOnWindow(const ScriptState*); |
| + |
| +CORE_EXPORT bool isFeatureEnabledInFrame(const FeaturePolicy::Feature&, |
| + const LocalFrame*); |
| + |
| +CORE_EXPORT void registerInstallConditionalFeaturesForCore(); |
| + |
| +} // namespace blink |
| + |
| +#endif // ConditionalFeaturesForCore_h |