Chromium Code Reviews| 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 559 v8::Local<v8::Object> navigator = global->Get(context, navigatorName ).ToLocalChecked()->ToObject(); | 559 v8::Local<v8::Object> navigator = global->Get(context, navigatorName ).ToLocalChecked()->ToObject(); |
| 560 V8DedicatedWorkerGlobalScopePartial::installDurableStorage(scriptSta te, global); | 560 V8DedicatedWorkerGlobalScopePartial::installDurableStorage(scriptSta te, global); |
| 561 V8WorkerNavigatorPartial::installDurableStorage(scriptState, navigat or); | 561 V8WorkerNavigatorPartial::installDurableStorage(scriptState, navigat or); |
| 562 } else if (executionContext->isServiceWorkerGlobalScope()) { | 562 } else if (executionContext->isServiceWorkerGlobalScope()) { |
| 563 v8::Local<v8::Object> navigator = global->Get(context, navigatorName ).ToLocalChecked()->ToObject(); | 563 v8::Local<v8::Object> navigator = global->Get(context, navigatorName ).ToLocalChecked()->ToObject(); |
| 564 V8ServiceWorkerGlobalScope::installDurableStorage(scriptState, globa l); | 564 V8ServiceWorkerGlobalScope::installDurableStorage(scriptState, globa l); |
| 565 V8WorkerNavigatorPartial::installDurableStorage(scriptState, navigat or); | 565 V8WorkerNavigatorPartial::installDurableStorage(scriptState, navigat or); |
| 566 } | 566 } |
| 567 originTrialContext->setFeatureBindingsInstalled("DurableStorage"); | 567 originTrialContext->setFeatureBindingsInstalled("DurableStorage"); |
| 568 } | 568 } |
| 569 | |
| 570 if (!originTrialContext->featureBindingsInstalled("WebBluetooth") && (Runtim eEnabledFeatures::webBluetoothEnabled() || originTrialContext->isFeatureEnabled( "WebBluetooth", nullptr))) { | |
| 571 v8::Local<v8::String> navigatorName = v8::String::NewFromOneByte(isolate , reinterpret_cast<const uint8_t*>("navigator"), v8::NewStringType::kNormal).ToL ocalChecked(); | |
| 572 if (executionContext->isDocument()) { | |
| 573 v8::Local<v8::Object> navigator = global->Get(context, navigatorName ).ToLocalChecked()->ToObject(); | |
| 574 // For global interfaces e.g. BluetoothUUID. | |
| 575 V8WindowPartial::installWebBluetooth(scriptState, global); | |
| 576 // For navigator interfaces e.g. navigator.bluetooth. | |
| 577 V8NavigatorPartial::installWebBluetooth(scriptState, navigator); | |
| 578 } | |
| 579 originTrialContext->setFeatureBindingsInstalled("WebBluetooth"); | |
|
iclelland
2016/06/24 03:37:23
Just a note, that if https://codereview.chromium.
ortuno
2016/06/24 16:01:31
My reviewer is out until tuesday, so your patch wi
| |
| 580 } | |
| 569 } | 581 } |
| 570 | 582 |
| 571 void registerInstallOriginTrialsForModules() | 583 void registerInstallOriginTrialsForModules() |
| 572 { | 584 { |
| 573 s_originalInstallOriginTrialsFunction = setInstallOriginTrialsFunction(&inst allOriginTrialsForModules); | 585 s_originalInstallOriginTrialsFunction = setInstallOriginTrialsFunction(&inst allOriginTrialsForModules); |
| 574 } | 586 } |
| 575 } // namespace blink | 587 } // namespace blink |
| OLD | NEW |