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

Side by Side Diff: content/child/bluetooth/bluetooth_dispatcher.h

Issue 1120373004: bluetooth: Browser-side implementation of connectGATT. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-request-device-implementation
Patch Set: Address jyasskin's comments Created 5 years, 7 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 #ifndef CONTENT_CHILD_BLUETOOTH_BLUETOOTH_DISPATCHER_H_ 5 #ifndef CONTENT_CHILD_BLUETOOTH_BLUETOOTH_DISPATCHER_H_
6 #define CONTENT_CHILD_BLUETOOTH_BLUETOOTH_DISPATCHER_H_ 6 #define CONTENT_CHILD_BLUETOOTH_BLUETOOTH_DISPATCHER_H_
7 7
8 #include "base/id_map.h" 8 #include "base/id_map.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "content/child/worker_task_runner.h" 10 #include "content/child/worker_task_runner.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 int request_id, 60 int request_id,
61 const BluetoothDevice& device); 61 const BluetoothDevice& device);
62 void OnRequestDeviceError(int thread_id, 62 void OnRequestDeviceError(int thread_id,
63 int request_id, 63 int request_id,
64 BluetoothError error_type); 64 BluetoothError error_type);
65 65
66 void OnConnectGATTSuccess(int thread_id, 66 void OnConnectGATTSuccess(int thread_id,
67 int request_id, 67 int request_id,
68 const std::string& message); 68 const std::string& message);
69 69
70 void OnConnectGATTError(int thread_id,
71 int request_id,
72 BluetoothError error_type);
73
70 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 74 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
71 75
72 // Tracks device requests sent to browser to match replies with callbacks. 76 // Tracks device requests sent to browser to match replies with callbacks.
73 // Owns callback objects. 77 // Owns callback objects.
74 IDMap<blink::WebBluetoothRequestDeviceCallbacks, IDMapOwnPointer> 78 IDMap<blink::WebBluetoothRequestDeviceCallbacks, IDMapOwnPointer>
75 pending_requests_; 79 pending_requests_;
76 // Tracks requests to connect to a device. 80 // Tracks requests to connect to a device.
77 // Owns callback objects. 81 // Owns callback objects.
78 IDMap<blink::WebBluetoothConnectGATTCallbacks, IDMapOwnPointer> 82 IDMap<blink::WebBluetoothConnectGATTCallbacks, IDMapOwnPointer>
79 pending_connect_requests_; 83 pending_connect_requests_;
80 84
81 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcher); 85 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcher);
82 }; 86 };
83 87
84 } // namespace content 88 } // namespace content
85 89
86 #endif // CONTENT_CHILD_BLUETOOTH_BLUETOOTH_DISPATCHER_H_ 90 #endif // CONTENT_CHILD_BLUETOOTH_BLUETOOTH_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/browser/bluetooth/bluetooth_dispatcher_host.cc ('k') | content/child/bluetooth/bluetooth_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698