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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
index 5b33bf21c4ddfeda8043fbfbb8d12287f59b3b26..6949310aac22a7810a28306c0975a805dbaaca5e 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
@@ -12,8 +12,9 @@
#include "platform/heap/Heap.h"
#include "public/platform/modules/bluetooth/WebBluetoothDevice.h"
#include "public/platform/modules/bluetooth/WebBluetoothDeviceInit.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
#include "wtf/text/WTFString.h"
-#include <memory>
namespace blink {
@@ -35,11 +36,11 @@ class BluetoothDevice final
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(BluetoothDevice);
public:
- BluetoothDevice(ExecutionContext*, std::unique_ptr<WebBluetoothDeviceInit>);
+ BluetoothDevice(ExecutionContext*, PassOwnPtr<WebBluetoothDeviceInit>);
// Interface required by CallbackPromiseAdapter:
- using WebType = std::unique_ptr<WebBluetoothDeviceInit>;
- static BluetoothDevice* take(ScriptPromiseResolver*, std::unique_ptr<WebBluetoothDeviceInit>);
+ using WebType = OwnPtr<WebBluetoothDeviceInit>;
+ static BluetoothDevice* take(ScriptPromiseResolver*, PassOwnPtr<WebBluetoothDeviceInit>);
// We should disconnect from the device in all of the following cases:
// 1. When the object gets GarbageCollected e.g. it went out of scope.
@@ -80,7 +81,7 @@ public:
DEFINE_ATTRIBUTE_EVENT_LISTENER(gattserverdisconnected);
private:
- std::unique_ptr<WebBluetoothDeviceInit> m_webDevice;
+ OwnPtr<WebBluetoothDeviceInit> m_webDevice;
Member<BluetoothRemoteGATTServer> m_gatt;
};

Powered by Google App Engine
This is Rietveld 408576698