OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 | 604 |
605 if (!originTrialContext->featureBindingsInstalled("WebBluetooth") && (Runtim
eEnabledFeatures::webBluetoothEnabled() || originTrialContext->isFeatureEnabled(
"WebBluetooth"))) { | 605 if (!originTrialContext->featureBindingsInstalled("WebBluetooth") && (Runtim
eEnabledFeatures::webBluetoothEnabled() || originTrialContext->isFeatureEnabled(
"WebBluetooth"))) { |
606 if (executionContext->isDocument()) { | 606 if (executionContext->isDocument()) { |
607 // For global interfaces e.g. BluetoothUUID. | 607 // For global interfaces e.g. BluetoothUUID. |
608 V8WindowPartial::installWebBluetooth(scriptState, global); | 608 V8WindowPartial::installWebBluetooth(scriptState, global); |
609 // For navigator interfaces e.g. navigator.bluetooth. | 609 // For navigator interfaces e.g. navigator.bluetooth. |
610 V8NavigatorPartial::installWebBluetooth(scriptState); | 610 V8NavigatorPartial::installWebBluetooth(scriptState); |
611 } | 611 } |
612 } | 612 } |
613 | 613 |
| 614 if (!originTrialContext->featureBindingsInstalled("WebUSB") && (RuntimeEnabl
edFeatures::webUSBEnabled() || originTrialContext->isFeatureEnabled("WebUSB")))
{ |
| 615 if (executionContext->isDocument()) { |
| 616 // For global interfaces e.g. USBInterface. |
| 617 V8WindowPartial::installWebUSB(scriptState, global); |
| 618 // For navigator interfaces e.g. navigator.usb. |
| 619 V8NavigatorPartial::installWebUSB(scriptState); |
| 620 } |
| 621 } |
| 622 |
| 623 |
614 if (!originTrialContext->featureBindingsInstalled("ForeignFetch") && (Runtim
eEnabledFeatures::foreignFetchEnabled() || originTrialContext->isFeatureEnabled(
"ForeignFetch"))) { | 624 if (!originTrialContext->featureBindingsInstalled("ForeignFetch") && (Runtim
eEnabledFeatures::foreignFetchEnabled() || originTrialContext->isFeatureEnabled(
"ForeignFetch"))) { |
615 if (executionContext->isServiceWorkerGlobalScope()) { | 625 if (executionContext->isServiceWorkerGlobalScope()) { |
616 V8ServiceWorkerGlobalScope::installForeignFetch(scriptState, global)
; | 626 V8ServiceWorkerGlobalScope::installForeignFetch(scriptState, global)
; |
617 } | 627 } |
618 } | 628 } |
619 } | 629 } |
620 | 630 |
621 void registerInstallOriginTrialsForModules() | 631 void registerInstallOriginTrialsForModules() |
622 { | 632 { |
623 s_originalInstallOriginTrialsFunction = setInstallOriginTrialsFunction(&inst
allOriginTrialsForModules); | 633 s_originalInstallOriginTrialsFunction = setInstallOriginTrialsFunction(&inst
allOriginTrialsForModules); |
624 } | 634 } |
625 } // namespace blink | 635 } // namespace blink |
OLD | NEW |