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

Unified Diff: content/browser/bluetooth/bluetooth_dispatcher_host.h

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 side-by-side diff with in-line comments
Download patch
Index: content/browser/bluetooth/bluetooth_dispatcher_host.h
diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.h b/content/browser/bluetooth/bluetooth_dispatcher_host.h
index d55e58889e0b34cf6103ec2cf0def77f2e1dd0e7..7769ef315e5b10ae91094ff87415a54e9bb63054 100644
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.h
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.h
@@ -14,6 +14,8 @@
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/bluetooth/bluetooth_allowed_devices_map.h"
+#include "content/browser/bluetooth/bluetooth_metrics.h"
+#include "content/common/bluetooth/bluetooth_messages.h"
#include "content/public/browser/bluetooth_chooser.h"
#include "content/public/browser/browser_message_filter.h"
#include "device/bluetooth/bluetooth_adapter.h"
@@ -53,6 +55,24 @@ class CONTENT_EXPORT BluetoothDispatcherHost final
void SetBluetoothAdapterForTesting(
scoped_refptr<device::BluetoothAdapter> mock_adapter);
+ struct CacheQueryResult {
+ CacheQueryResult();
+ CacheQueryResult(CacheQueryOutcome outcome);
+ ~CacheQueryResult();
+ blink::WebBluetoothError GetWebError() const;
+ device::BluetoothDevice* device;
Ken Rockot(use gerrit already) 2016/03/09 19:31:26 instead of intializers in each constructor just se
ortuno 2016/03/16 16:29:45 Done.
+ device::BluetoothGattService* service;
+ device::BluetoothGattCharacteristic* characteristic;
+ CacheQueryOutcome outcome;
+ };
+
+ // Queries the platform cache for a characteristic with
+ // |characteristic_instance_id|. Fills in the |outcome| field, and |device|,
+ // |service| and |characteristic| fields if successful.
+ CacheQueryResult QueryCacheForCharacteristic(
+ const url::Origin& origin,
+ const std::string& characteristic_instance_id);
+
protected:
~BluetoothDispatcherHost() override;
@@ -60,7 +80,6 @@ class CONTENT_EXPORT BluetoothDispatcherHost final
friend class base::DeleteHelper<BluetoothDispatcherHost>;
friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>;
- struct CacheQueryResult;
struct RequestDeviceSession;
struct PrimaryServicesRequest;
@@ -129,11 +148,6 @@ class CONTENT_EXPORT BluetoothDispatcherHost final
int request_id,
int frame_routing_id,
const std::string& characteristic_instance_id);
- void OnWriteValue(int thread_id,
- int request_id,
- int frame_routing_id,
- const std::string& characteristic_instance_id,
- const std::vector<uint8_t>& value);
void OnStartNotifications(int thread_id,
int request_id,
int frame_routing_id,
@@ -210,12 +224,6 @@ class CONTENT_EXPORT BluetoothDispatcherHost final
int request_id,
device::BluetoothGattService::GattErrorCode);
- // Callbacks for BluetoothGattCharacteristic::WriteRemoteCharacteristic.
- void OnWriteValueSuccess(int thread_id, int request_id);
- void OnWriteValueFailed(int thread_id,
- int request_id,
- device::BluetoothGattService::GattErrorCode);
-
// Callbacks for BluetoothGattCharacteristic::StartNotifySession.
void OnStartNotifySessionSuccess(
int thread_id,
@@ -247,12 +255,6 @@ class CONTENT_EXPORT BluetoothDispatcherHost final
// in the |outcome| field, and |device| and |service| fields if successful.
CacheQueryResult QueryCacheForService(const url::Origin& origin,
const std::string& service_instance_id);
- // Queries the platform cache for a characteristic with
- // |characteristic_instance_id|. Fills in the |outcome| field, and |device|,
- // |service| and |characteristic| fields if successful.
- CacheQueryResult QueryCacheForCharacteristic(
- const url::Origin& origin,
- const std::string& characteristic_instance_id);
// Adds the PrimaryServicesRequest to the vector of pending services requests
// for that device.

Powered by Google App Engine
This is Rietveld 408576698