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

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

Issue 1382743002: bluetooth: Add characteristicvaluechanged event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-notifications-1
Patch Set: Address tkent's comments Created 5 years, 2 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
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 callbacks); 77 callbacks);
78 } 78 }
79 79
80 void WebBluetoothImpl::characteristicObjectRemoved( 80 void WebBluetoothImpl::characteristicObjectRemoved(
81 const blink::WebString& characteristic_instance_id, 81 const blink::WebString& characteristic_instance_id,
82 blink::WebBluetoothGATTCharacteristic* characteristic) { 82 blink::WebBluetoothGATTCharacteristic* characteristic) {
83 GetDispatcher()->characteristicObjectRemoved(characteristic_instance_id, 83 GetDispatcher()->characteristicObjectRemoved(characteristic_instance_id,
84 characteristic); 84 characteristic);
85 } 85 }
86 86
87 void WebBluetoothImpl::registerCharacteristicObject(
88 const blink::WebString& characteristic_instance_id,
89 blink::WebBluetoothGATTCharacteristic* characteristic) {
90 GetDispatcher()->registerCharacteristicObject(characteristic_instance_id,
91 characteristic);
92 }
93
87 BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() { 94 BluetoothDispatcher* WebBluetoothImpl::GetDispatcher() {
88 return BluetoothDispatcher::GetOrCreateThreadSpecificInstance( 95 return BluetoothDispatcher::GetOrCreateThreadSpecificInstance(
89 thread_safe_sender_.get()); 96 thread_safe_sender_.get());
90 } 97 }
91 98
92 } // namespace content 99 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698