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

Unified Diff: third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError.h

Issue 1837253002: bluetooth: Change definition of WebBluetoothError to mojo enum (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Created 4 years, 9 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/public/platform/modules/bluetooth/WebBluetoothError.h
diff --git a/third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError.h b/third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError.h
index 45046259e76f9ddd51e46c799f651468bee87ee5..7987c6630f5d0386e104c92733f6555f2296012a 100644
--- a/third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError.h
+++ b/third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError.h
@@ -5,6 +5,8 @@
#ifndef WebBluetoothError_h
#define WebBluetoothError_h
+#include "public/platform/modules/bluetooth/web_bluetooth.mojom.h"
+
namespace blink {
// Errors that can occur during Web Bluetooth execution, which are transformed
@@ -13,62 +15,7 @@ namespace blink {
// These errors all produce constant message strings. If a particular message
// needs a dynamic component, we should add a separate enum so type-checking the IPC
// ensures the dynamic component is passed.
-enum class WebBluetoothError {
- // AbortError:
- // InvalidModificationError:
- GATTInvalidAttributeLength,
- // InvalidStateError:
- ServiceNoLongerExists,
- CharacteristicNoLongerExists,
- // NetworkError:
- ConnectAlreadyInProgress,
- ConnectAttributeLengthInvalid,
- ConnectAuthCanceled,
- ConnectAuthFailed,
- ConnectAuthRejected,
- ConnectAuthTimeout,
- ConnectConnectionCongested,
- ConnectInsufficientEncryption,
- ConnectOffsetInvalid,
- ConnectReadNotPermitted,
- ConnectRequestNotSupported,
- ConnectUnknownError,
- ConnectUnknownFailure,
- ConnectUnsupportedDevice,
- ConnectWriteNotPermitted,
- DeviceNoLongerInRange,
- GATTNotPaired,
- GATTOperationInProgress,
- UntranslatedConnectErrorCode,
- // NotFoundError:
- NoBluetoothAdapter,
- ChosenDeviceVanished,
- ChooserCancelled,
- ChooserDisabled,
- ChooserDeniedPermission,
- ServiceNotFound,
- CharacteristicNotFound,
- NoCharacteristicsFound,
- // NotSupportedError:
- GATTUnknownError,
- GATTUnknownFailure,
- GATTNotPermitted,
- GATTNotSupported,
- GATTUntranslatedErrorCode,
- // SecurityError:
- GATTNotAuthorized,
- BlacklistedCharacteristicUUID,
- BlacklistedRead,
- BlacklistedWrite,
- NotAllowedToAccessService,
- RequestDeviceWithBlacklistedUUID,
- RequestDeviceWithUniqueOrigin,
- RequestDeviceWithoutFrame,
- // SyntaxError:
-
- ENUM_MAX_VALUE = RequestDeviceWithoutFrame,
-};
-
+using WebBluetoothError = mojom::WebBluetoothError;
} // namespace blink
#endif // WebBluetoothError_h

Powered by Google App Engine
This is Rietveld 408576698