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"
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::SetBluetoothMockDataSetForTesting(
25 const std::string
& name
) {
26 GetDispatcher()->SetBluetoothMockDataSetForTesting(name
);
29 BluetoothDispatcher
* WebBluetoothImpl::GetDispatcher() {
30 return BluetoothDispatcher::GetOrCreateThreadSpecificInstance(
31 thread_safe_sender_
.get());
34 } // namespace content