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

Unified Diff: Source/modules/bluetooth/BluetoothDevice.h

Issue 1148283009: bluetooth: Remove deep copying of structs by using OwnPtr. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@bluetooth-get-primary-service-implementation
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/bluetooth/BluetoothDevice.h
diff --git a/Source/modules/bluetooth/BluetoothDevice.h b/Source/modules/bluetooth/BluetoothDevice.h
index 11fa8c54c814d405acfbfa62697fc9e37111ed45..abb39dc509b7d5dbf8e59c67994a4525cd6a2c9c 100644
--- a/Source/modules/bluetooth/BluetoothDevice.h
+++ b/Source/modules/bluetooth/BluetoothDevice.h
@@ -27,9 +27,7 @@ class BluetoothDevice final
, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- BluetoothDevice(const WebBluetoothDevice&);
-
- static BluetoothDevice* create(const WebBluetoothDevice&);
+ BluetoothDevice(PassOwnPtr<WebBluetoothDevice>);
haraken 2015/06/04 00:40:16 Add explicit.
ScriptPromise connectGATT(ScriptState*);
@@ -42,8 +40,8 @@ public:
DEFINE_INLINE_TRACE() { }
// IDL exposed interface:
- String instanceID() { return m_webDevice.instanceID; }
- String name() { return m_webDevice.name; }
+ String instanceID() { return m_webDevice->instanceID; }
+ String name() { return m_webDevice->name; }
unsigned deviceClass(bool& isNull);
String vendorIDSource();
unsigned vendorID(bool& isNull);
@@ -53,7 +51,7 @@ public:
Vector<String> uuids();
private:
- WebBluetoothDevice m_webDevice;
+ OwnPtr<WebBluetoothDevice> m_webDevice;
};
} // namespace blink
« no previous file with comments | « no previous file | Source/modules/bluetooth/BluetoothDevice.cpp » ('j') | Source/modules/bluetooth/BluetoothDevice.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698