aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bluetoothdevice.rs
diff options
context:
space:
mode:
authorAttila Dusnoki <dati91@gmail.com>2017-02-13 13:44:21 +0100
committerAttila Dusnoki <dati91@gmail.com>2017-02-13 14:58:16 +0100
commitd5cc10a63608c13c732663ebb94068a9beba632f (patch)
tree4cabe40840d88e3725a80d241d494c86329d25d0 /components/script/dom/bluetoothdevice.rs
parentb1d388a991de21f00f8817282e0930ada5104d0d (diff)
downloadservo-d5cc10a63608c13c732663ebb94068a9beba632f.tar.gz
servo-d5cc10a63608c13c732663ebb94068a9beba632f.zip
Move extra permission data to window
Diffstat (limited to 'components/script/dom/bluetoothdevice.rs')
-rw-r--r--components/script/dom/bluetoothdevice.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/bluetoothdevice.rs b/components/script/dom/bluetoothdevice.rs
index 16892f36013..d33aab9be97 100644
--- a/components/script/dom/bluetoothdevice.rs
+++ b/components/script/dom/bluetoothdevice.rs
@@ -15,7 +15,7 @@ use dom::bindings::inheritance::Castable;
use dom::bindings::js::{JS, MutNullableJS, Root};
use dom::bindings::reflector::{DomObject, reflect_dom_object};
use dom::bindings::str::DOMString;
-use dom::bluetooth::{allowed_devices_contains_id, AsyncBluetoothListener, Bluetooth, response_async};
+use dom::bluetooth::{AsyncBluetoothListener, Bluetooth, response_async};
use dom::bluetoothcharacteristicproperties::BluetoothCharacteristicProperties;
use dom::bluetoothremotegattcharacteristic::BluetoothRemoteGATTCharacteristic;
use dom::bluetoothremotegattdescriptor::BluetoothRemoteGATTDescriptor;
@@ -228,7 +228,8 @@ impl BluetoothDeviceMethods for BluetoothDevice {
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothdevice-gatt
fn GetGatt(&self) -> Option<Root<BluetoothRemoteGATTServer>> {
// Step 1.
- if allowed_devices_contains_id(self.id.clone()) && !self.is_represented_device_null() {
+ if self.global().as_window().bluetooth_extra_permission_data()
+ .allowed_devices_contains_id(self.id.clone()) && !self.is_represented_device_null() {
return Some(self.get_gatt())
}
// Step 2.