Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.h

Issue 2260113002: Lazily install origin trial features on V8 objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase after parent CL landed Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.h b/third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.h
new file mode 100644
index 0000000000000000000000000000000000000000..66a51225071d3b9a4d8318fc5b81dae98eb902e4
--- /dev/null
+++ b/third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.h
@@ -0,0 +1,32 @@
+// Copyright 2016 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 ConditionalFeatures_h
+#define ConditionalFeatures_h
+
+#include "bindings/core/v8/DOMWrapperWorld.h"
+#include "core/CoreExport.h"
+#include <v8.h>
+
+namespace blink {
+
+class ScriptState;
+
+using InstallConditionalFeaturesFunction = void (*)(const WrapperTypeInfo*, const ScriptState*, v8::Local<v8::Object>, v8::Local<v8::Function>);
+
+// Installs all of the conditionally enabled V8 bindings for the given type, in
+// a specific context. This is called in V8PerContextData, after the constructor
+// and prototype for the type have been created. It indirectly calls the
+// function set by |setInstallConditionalFeaturesFunction|.
+CORE_EXPORT void installConditionalFeatures(const WrapperTypeInfo*, const ScriptState*, v8::Local<v8::Object>, v8::Local<v8::Function>);
+
+// Sets the function to be called by |installConditionalFeatures|. The function
+// is initially set to the private |installConditionalFeaturesCore| function,
+// but can be overridden by this function. A pointer to the previously set
+// function is returned, so that functions can be chained.
+CORE_EXPORT InstallConditionalFeaturesFunction setInstallConditionalFeaturesFunction(InstallConditionalFeaturesFunction);
+
+} // namespace blink
+
+#endif // ConditionalFeatures_h
« no previous file with comments | « third_party/WebKit/Source/bindings/bindings.gni ('k') | third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698