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

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

Issue 2142813003: bluetooth: Avoid including non-blink mojo bindings in blink code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Add DCHECK for enum Created 4 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: third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp
index a600dec269d4c87cbf28e5aafb20e593f228b023..31a77d16d00919bd660a32c832263613e2d47c33 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp
@@ -6,17 +6,18 @@
#include "core/dom/DOMException.h"
#include "core/dom/ExceptionCode.h"
+#include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h"
namespace blink {
-DOMException* BluetoothError::take(ScriptPromiseResolver*, const WebBluetoothError& webError)
+DOMException* BluetoothError::take(ScriptPromiseResolver*, int32_t webError /* Corresponds to WebBluetoothError in web_bluetooth.mojom */)
{
- switch (webError) {
- case WebBluetoothError::SUCCESS:
+ switch (static_cast<mojom::blink::WebBluetoothError>(webError)) {
+ case mojom::blink::WebBluetoothError::SUCCESS:
ASSERT_NOT_REACHED();
return DOMException::create(UnknownError);
-#define MAP_ERROR(enumeration, name, message) \
- case WebBluetoothError::enumeration: \
+#define MAP_ERROR(enumeration, name, message) \
+ case mojom::blink::WebBluetoothError::enumeration: \
return DOMException::create(name, message)
// InvalidModificationErrors:

Powered by Google App Engine
This is Rietveld 408576698