| 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/modules/v8/ConditionalFeaturesForModules.h" | 5 #include "bindings/modules/v8/ConditionalFeaturesForModules.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptState.h" | 7 #include "bindings/core/v8/ScriptState.h" |
| 8 #include "bindings/core/v8/V8DedicatedWorkerGlobalScope.h" | 8 #include "bindings/core/v8/V8DedicatedWorkerGlobalScope.h" |
| 9 #include "bindings/core/v8/V8Navigator.h" | 9 #include "bindings/core/v8/V8Navigator.h" |
| 10 #include "bindings/core/v8/V8SharedWorkerGlobalScope.h" | 10 #include "bindings/core/v8/V8SharedWorkerGlobalScope.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 } | 54 } |
| 55 if (OriginTrials::webUSBEnabled(executionContext)) { | 55 if (OriginTrials::webUSBEnabled(executionContext)) { |
| 56 V8NavigatorPartial::installWebUSB(isolate, world, v8::Local<v8::Object>(), | 56 V8NavigatorPartial::installWebUSB(isolate, world, v8::Local<v8::Object>(), |
| 57 prototypeObject, interfaceObject); | 57 prototypeObject, interfaceObject); |
| 58 } | 58 } |
| 59 if (OriginTrials::webVREnabled(executionContext)) { | 59 if (OriginTrials::webVREnabled(executionContext)) { |
| 60 V8NavigatorPartial::installWebVR(isolate, world, global, prototypeObject, | 60 V8NavigatorPartial::installWebVR(isolate, world, global, prototypeObject, |
| 61 interfaceObject); | 61 interfaceObject); |
| 62 } | 62 } |
| 63 } else if (wrapperTypeInfo == &V8Window::wrapperTypeInfo) { | 63 } else if (wrapperTypeInfo == &V8Window::wrapperTypeInfo) { |
| 64 if (OriginTrials::imageCaptureEnabled(executionContext)) { |
| 65 V8WindowPartial::installImageCapture(isolate, world, global, |
| 66 prototypeObject, interfaceObject); |
| 67 } |
| 64 if (OriginTrials::webUSBEnabled(executionContext)) { | 68 if (OriginTrials::webUSBEnabled(executionContext)) { |
| 65 V8WindowPartial::installWebUSB(isolate, world, global, prototypeObject, | 69 V8WindowPartial::installWebUSB(isolate, world, global, prototypeObject, |
| 66 interfaceObject); | 70 interfaceObject); |
| 67 } | 71 } |
| 68 if (OriginTrials::webVREnabled(executionContext)) { | 72 if (OriginTrials::webVREnabled(executionContext)) { |
| 69 V8WindowPartial::installWebVR(isolate, world, global, prototypeObject, | 73 V8WindowPartial::installWebVR(isolate, world, global, prototypeObject, |
| 70 interfaceObject); | 74 interfaceObject); |
| 71 } | 75 } |
| 72 if (OriginTrials::gamepadExtensionsEnabled(executionContext)) { | 76 if (OriginTrials::gamepadExtensionsEnabled(executionContext)) { |
| 73 V8WindowPartial::installGamepadExtensions( | 77 V8WindowPartial::installGamepadExtensions( |
| (...skipping 23 matching lines...) Expand all Loading... |
| 97 } | 101 } |
| 98 } | 102 } |
| 99 | 103 |
| 100 void registerInstallConditionalFeaturesForModules() { | 104 void registerInstallConditionalFeaturesForModules() { |
| 101 s_originalInstallConditionalFeaturesFunction = | 105 s_originalInstallConditionalFeaturesFunction = |
| 102 setInstallConditionalFeaturesFunction( | 106 setInstallConditionalFeaturesFunction( |
| 103 &installConditionalFeaturesForModules); | 107 &installConditionalFeaturesForModules); |
| 104 } | 108 } |
| 105 | 109 |
| 106 } // namespace blink | 110 } // namespace blink |
| OLD | NEW |