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

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

Issue 2718583002: Refactor WebBluetoothServiceClient in the web_bluetooth.mojom (Closed)
Patch Set: added new layout test Created 3 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/web_bluetooth_service_impl.h
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.h b/content/browser/bluetooth/web_bluetooth_service_impl.h
index e607e1a23bfdca7aa67bc51a107b105d38e7f54f..f52d506f7470a6eb1d61bac038d2fb5a0bcbd24d 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.h
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.h
@@ -7,6 +7,7 @@
#include <memory>
#include <string>
+#include <utility>
#include <vector>
#include "base/macros.h"
@@ -97,8 +98,6 @@ class CONTENT_EXPORT WebBluetoothServiceImpl
const std::vector<uint8_t>& value);
// WebBluetoothService methods:
- void SetClient(
- blink::mojom::WebBluetoothServiceClientAssociatedPtrInfo client) override;
void RequestDevice(blink::mojom::WebBluetoothRequestDeviceOptionsPtr options,
const RequestDeviceCallback& callback) override;
void RemoteServerConnect(
@@ -271,16 +270,15 @@ class CONTENT_EXPORT WebBluetoothServiceImpl
pending_primary_services_requests_;
// Map to keep track of the characteristics' notify sessions.
- std::unordered_map<std::string,
- std::unique_ptr<device::BluetoothGattNotifySession>>
+ std::unordered_map<
+ std::string,
+ std::pair<std::unique_ptr<device::BluetoothGattNotifySession>,
+ blink::mojom::WebBluetoothCharacteristicClientAssociatedPtr>>
dcheng 2017/03/13 07:15:57 Ditto.
juncai 2017/03/13 20:00:17 Done.
characteristic_id_to_notify_session_;
// The RFH that owns this instance.
RenderFrameHost* render_frame_host_;
- // Proxy to the WebBluetoothServiceClient to send device events to.
- blink::mojom::WebBluetoothServiceClientAssociatedPtr client_;
-
// The lifetime of this instance is exclusively managed by the RFH that
// owns it so we use a "Binding" as opposed to a "StrongBinding" which deletes
// the service on pipe connection errors.

Powered by Google App Engine
This is Rietveld 408576698