Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / content / child / bluetooth / web_bluetooth_impl.cc
blobd8b5813be6d01444e96eea8623980879b0ef7434
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/child/bluetooth/web_bluetooth_impl.h"
7 #include "content/child/bluetooth/bluetooth_dispatcher.h"
8 #include "content/child/thread_safe_sender.h"
10 namespace content {
12 WebBluetoothImpl::WebBluetoothImpl(ThreadSafeSender* thread_safe_sender)
13 : thread_safe_sender_(thread_safe_sender) {
16 WebBluetoothImpl::~WebBluetoothImpl() {
19 void WebBluetoothImpl::requestDevice(
20 blink::WebBluetoothRequestDeviceCallbacks* callbacks) {
21 GetDispatcher()->requestDevice(callbacks);
24 void WebBluetoothImpl::connectGATT(const blink::WebString& device_instance_id,
25 blink::WebBluetoothConnectGATTCallbacks* callbacks) {
26 GetDispatcher()->connectGATT(device_instance_id, callbacks);
29 void WebBluetoothImpl::SetBluetoothMockDataSetForTesting(
30 const std::string& name) {
31 GetDispatcher()->SetBluetoothMockDataSetForTesting(name);
34 BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() {
35 return BluetoothDispatcher::GetOrCreateThreadSpecificInstance(
36 thread_safe_sender_.get());
39 } // namespace content