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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. 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 6949310aac22a7810a28306c0975a805dbaaca5e..5b33bf21c4ddfeda8043fbfbb8d12287f59b3b26 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
@@ -12,9 +12,8 @@
#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 {
@@ -36,11 +35,11 @@ class BluetoothDevice final
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(BluetoothDevice);
public:
- BluetoothDevice(ExecutionContext*, PassOwnPtr<WebBluetoothDeviceInit>);
+ BluetoothDevice(ExecutionContext*, std::unique_ptr<WebBluetoothDeviceInit>);
// Interface required by CallbackPromiseAdapter:
- using WebType = OwnPtr<WebBluetoothDeviceInit>;
- static BluetoothDevice* take(ScriptPromiseResolver*, PassOwnPtr<WebBluetoothDeviceInit>);
+ using WebType = std::unique_ptr<WebBluetoothDeviceInit>;
+ static BluetoothDevice* take(ScriptPromiseResolver*, std::unique_ptr<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.
@@ -81,7 +80,7 @@ public:
DEFINE_ATTRIBUTE_EVENT_LISTENER(gattserverdisconnected);
private:
- OwnPtr<WebBluetoothDeviceInit> m_webDevice;
+ std::unique_ptr<WebBluetoothDeviceInit> m_webDevice;
Member<BluetoothRemoteGATTServer> m_gatt;
};

Powered by Google App Engine
This is Rietveld 408576698