Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Side by Side Diff: content/renderer/bluetooth/web_bluetooth_impl.cc

Issue 1775953004: bluetooth: Move writeValue to mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Moar cleanup Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/bluetooth/web_bluetooth_impl.h" 5 #include "content/renderer/bluetooth/web_bluetooth_impl.h"
6 6
7 #include "content/child/thread_safe_sender.h" 7 #include "content/child/thread_safe_sender.h"
8 #include "content/renderer/bluetooth/bluetooth_dispatcher.h" 8 #include "content/renderer/bluetooth/bluetooth_dispatcher.h"
9 #include "ipc/ipc_message.h" 9 #include "ipc/ipc_message.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 WebBluetoothImpl::WebBluetoothImpl(ThreadSafeSender* thread_safe_sender)
14 : WebBluetoothImpl(thread_safe_sender, MSG_ROUTING_NONE) {}
15
16 WebBluetoothImpl::WebBluetoothImpl(ThreadSafeSender* thread_safe_sender, 13 WebBluetoothImpl::WebBluetoothImpl(ThreadSafeSender* thread_safe_sender,
14 ServiceRegistry* service_registry,
17 int frame_routing_id) 15 int frame_routing_id)
18 : thread_safe_sender_(thread_safe_sender), 16 : thread_safe_sender_(thread_safe_sender),
19 frame_routing_id_(frame_routing_id) {} 17 frame_routing_id_(frame_routing_id),
18 service_registry_(service_registry) {}
20 19
21 WebBluetoothImpl::~WebBluetoothImpl() { 20 WebBluetoothImpl::~WebBluetoothImpl() {
22 } 21 }
23 22
24 void WebBluetoothImpl::requestDevice( 23 void WebBluetoothImpl::requestDevice(
25 const blink::WebRequestDeviceOptions& options, 24 const blink::WebRequestDeviceOptions& options,
26 blink::WebBluetoothRequestDeviceCallbacks* callbacks) { 25 blink::WebBluetoothRequestDeviceCallbacks* callbacks) {
27 GetDispatcher()->requestDevice(frame_routing_id_, options, callbacks); 26 GetDispatcher()->requestDevice(frame_routing_id_, options, callbacks);
28 } 27 }
29 28
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 100
102 void WebBluetoothImpl::registerCharacteristicObject( 101 void WebBluetoothImpl::registerCharacteristicObject(
103 const blink::WebString& characteristic_instance_id, 102 const blink::WebString& characteristic_instance_id,
104 blink::WebBluetoothRemoteGATTCharacteristic* characteristic) { 103 blink::WebBluetoothRemoteGATTCharacteristic* characteristic) {
105 GetDispatcher()->registerCharacteristicObject( 104 GetDispatcher()->registerCharacteristicObject(
106 frame_routing_id_, characteristic_instance_id, characteristic); 105 frame_routing_id_, characteristic_instance_id, characteristic);
107 } 106 }
108 107
109 BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() { 108 BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() {
110 return BluetoothDispatcher::GetOrCreateThreadSpecificInstance( 109 return BluetoothDispatcher::GetOrCreateThreadSpecificInstance(
111 thread_safe_sender_.get()); 110 thread_safe_sender_.get(), service_registry_);
112 } 111 }
113 112
114 } // namespace content 113 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698