| // Copyright 2014 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. |
| |
| // This file has been auto-generated from the Jinja2 template |
| // third_party/blink/renderer/bindings/templates/origin_trial_features_for_modules.cc.tmpl |
| // by the script generate_origin_trial_features.py. |
| // DO NOT MODIFY! |
| |
| // clang-format off |
| |
| #include "third_party/blink/renderer/bindings/modules/v8/origin_trial_features_for_modules.h" |
| |
| #include "third_party/blink/renderer/bindings/core/v8/origin_trial_features_for_core.h" |
| #include "third_party/blink/renderer/bindings/core/v8/v8_window.h" |
| #include "third_party/blink/renderer/core/context_features/context_feature_settings.h" |
| #include "third_party/blink/renderer/core/execution_context/execution_context.h" |
| #include "third_party/blink/renderer/core/frame/frame.h" |
| #include "third_party/blink/renderer/core/origin_trials/origin_trials.h" |
| #include "third_party/blink/renderer/platform/bindings/origin_trial_features.h" |
| #include "third_party/blink/renderer/platform/bindings/script_state.h" |
| #include "third_party/blink/renderer/platform/bindings/v8_per_context_data.h" |
| |
| namespace blink { |
| |
| namespace { |
| InstallOriginTrialFeaturesFunction |
| g_original_install_origin_trial_features_function = nullptr; |
| InstallPendingOriginTrialFeatureFunction |
| g_original_install_pending_origin_trial_feature_function = nullptr; |
| |
| void InstallOriginTrialFeaturesForModules( |
| const WrapperTypeInfo* wrapper_type_info, |
| const ScriptState* script_state, |
| v8::Local<v8::Object> prototype_object, |
| v8::Local<v8::Function> interface_object) { |
| (*g_original_install_origin_trial_features_function)( |
| wrapper_type_info, script_state, prototype_object, interface_object); |
| } |
| |
| void InstallPendingOriginTrialFeatureForModules( |
| const String& feature, |
| const ScriptState* script_state) { |
| (*g_original_install_pending_origin_trial_feature_function)(feature, |
| script_state); |
| |
| // TODO(iclelland): Extract this common code out of OriginTrialFeaturesForCore |
| // and OriginTrialFeaturesForModules into a block. |
| } |
| |
| } // namespace |
| |
| void RegisterInstallOriginTrialFeaturesForModules() { |
| RegisterInstallOriginTrialFeaturesForCore(); |
| g_original_install_origin_trial_features_function = |
| SetInstallOriginTrialFeaturesFunction( |
| &InstallOriginTrialFeaturesForModules); |
| g_original_install_pending_origin_trial_feature_function = |
| SetInstallPendingOriginTrialFeatureFunction( |
| &InstallPendingOriginTrialFeatureForModules); |
| } |
| |
| } // namespace blink |