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

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: retry! Created 5 years, 4 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..5b5b4be0cb319b9bbdb3dc6250b7e9a86f848a83 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"
@@ -20,28 +21,22 @@ struct WebBluetoothGATTService;
struct WebRequestDeviceOptions;
// Success and failure callbacks for requestDevice.
-// WebBluetoothDevice and WebBluetoothError object ownership is transferred.
-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:
« no previous file with comments | « public/platform/WebServiceWorkerRegistration.h ('k') | public/platform/modules/notifications/WebNotificationManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698