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

Unified Diff: public/platform/modules/bluetooth/WebBluetooth.h

Issue 1234603003: CallbackPromiseAdapter types should be more compatible with WebCallbacks (1/3). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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: public/platform/modules/bluetooth/WebBluetooth.h
diff --git a/public/platform/modules/bluetooth/WebBluetooth.h b/public/platform/modules/bluetooth/WebBluetooth.h
index 3056f3ee9d187ab2c70aa31208016fb31f2c4e98..d67b12999059b6c91de99e5bff059df29c5a5841 100644
--- a/public/platform/modules/bluetooth/WebBluetooth.h
+++ b/public/platform/modules/bluetooth/WebBluetooth.h
@@ -6,6 +6,7 @@
#define WebBluetooth_h
#include "public/platform/WebCallbacks.h"
+#include "public/platform/WebPassOwnPtr.h"
#include "public/platform/WebString.h"
#include "public/platform/WebVector.h"
#include "public/platform/modules/bluetooth/WebBluetoothError.h"
@@ -21,27 +22,27 @@ struct WebRequestDeviceOptions;
// Success and failure callbacks for requestDevice.
// WebBluetoothDevice and WebBluetoothError object ownership is transferred.
scheib 2015/07/27 17:35:28 Comments of form "// ... and ... object ownership
yhirano 2015/07/29 04:01:54 Done.
-typedef WebCallbacks<WebBluetoothDevice*, WebBluetoothError*> WebBluetoothRequestDeviceCallbacks;
+using WebBluetoothRequestDeviceCallbacks = WebCallbacks<WebPassOwnPtr<WebBluetoothDevice>, WebPassOwnPtr<WebBluetoothError>>;
// Success and failure callbacks for connectGATT.
// WebBluetoothGATTRemoteServer and WebBluetoothError object ownership is transferred.
-typedef WebCallbacks<WebBluetoothGATTRemoteServer*, WebBluetoothError*> WebBluetoothConnectGATTCallbacks;
+using WebBluetoothConnectGATTCallbacks = WebCallbacks<WebPassOwnPtr<WebBluetoothGATTRemoteServer>, WebPassOwnPtr<WebBluetoothError>>;
// Success and failure callbacks for getPrimaryService.
// WebBluetoothGATTService and WebBluetoothError object ownership is transferred.
-typedef WebCallbacks<WebBluetoothGATTService*, WebBluetoothError*> WebBluetoothGetPrimaryServiceCallbacks;
+using WebBluetoothGetPrimaryServiceCallbacks = WebCallbacks<WebPassOwnPtr<WebBluetoothGATTService>, WebPassOwnPtr<WebBluetoothError>>;
// Success and failure callbacks for getCharacteristic.
// WebBluetoothCharacteristic and WebBluetoothError object ownership is transferred.
-typedef WebCallbacks<WebBluetoothGATTCharacteristic*, WebBluetoothError*> WebBluetoothGetCharacteristicCallbacks;
+using WebBluetoothGetCharacteristicCallbacks = WebCallbacks<WebPassOwnPtr<WebBluetoothGATTCharacteristic>, WebPassOwnPtr<WebBluetoothError>>;
// Success and failure callbacks for readValue.
// WebVector and WebBluetoothError object ownership is transferred.
-typedef WebCallbacks<WebVector<uint8_t>*, WebBluetoothError*> WebBluetoothReadValueCallbacks;
+using WebBluetoothReadValueCallbacks = WebCallbacks<WebPassOwnPtr<WebVector<uint8_t>>, WebPassOwnPtr<WebBluetoothError>>;
// Success and failure callbacks for writeValue.
// WebBluetoothError object ownership is transferred.
-typedef WebCallbacks<void, WebBluetoothError*> WebBluetoothWriteValueCallbacks;
+using WebBluetoothWriteValueCallbacks = WebCallbacks<void, WebPassOwnPtr<WebBluetoothError>>;
class WebBluetooth {
public:

Powered by Google App Engine
This is Rietveld 408576698