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

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

Issue 2564283004: bluetooth: web: Include the UUID in the error message. (Closed)
Patch Set: Addressed issues in code review. Created 4 years 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/BluetoothError.h
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h
index 311677d96a9fef7cf2ac76630f024f4a1c811cea..01f9d8478baf67e9a62d5a2633bf1715b2455032 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h
@@ -6,6 +6,7 @@
#define BluetoothError_h
#include "platform/heap/Handle.h"
+#include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h"
haraken 2017/02/07 15:22:52 Nit: "third_party/WebKit" is not needed.
#include "wtf/Allocator.h"
namespace blink {
@@ -26,6 +27,17 @@ class BluetoothError {
ScriptPromiseResolver*,
int32_t
error /* Corresponds to WebBluetoothResult in web_bluetooth.mojom */);
+ static DOMException* take(
+ ScriptPromiseResolver*,
+ int32_t
+ error /* Corresponds to WebBluetoothResult in web_bluetooth.mojom */,
+ String detailedMessage /* Detailed error message - can be empty.*/);
+
+ // A convenience function that checks if the int32_t error code is
+ // the same as the given WebBluetoothResult error. Parts of the code
+ // uses int32_t for errors while other parts uses WebBluetoothResult.
+ static bool isSameError(int32_t error,
+ mojom::blink::WebBluetoothResult webError);
haraken 2017/02/07 15:22:52 Can we use a type mapping for this? (I don't know
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698