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

Side by Side Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothError.h

Issue 2831783002: bluetooth: Clean up better 'not connected' errors (Closed)
Patch Set: Fix enum Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BluetoothError_h 5 #ifndef BluetoothError_h
6 #define BluetoothError_h 6 #define BluetoothError_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 #include "platform/wtf/Allocator.h" 9 #include "platform/wtf/Allocator.h"
10 #include "public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h" 10 #include "public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 // Used when generating DOMExceptions specific to each operation. 14 // Used when generating DOMExceptions specific to each operation.
15 // TODO(crbug.com/684445): Add DescriptorsRetrieval.
16 enum class BluetoothOperation { 15 enum class BluetoothOperation {
17 kServicesRetrieval, 16 kServicesRetrieval,
18 kCharacteristicsRetrieval, 17 kCharacteristicsRetrieval,
19 kDescriptorsRetrieval, 18 kDescriptorsRetrieval,
20 GATT, 19 kGATT,
21 }; 20 };
22 21
23 // These error codes requires detailed error messages. 22 // These error codes requires detailed error messages.
24 enum class BluetoothErrorCode { 23 enum class BluetoothErrorCode {
25 kInvalidService, 24 kInvalidService,
26 kInvalidCharacteristic, 25 kInvalidCharacteristic,
27 kInvalidDescriptor, 26 kInvalidDescriptor,
28 kServiceNotFound, 27 kServiceNotFound,
29 kCharacteristicNotFound, 28 kCharacteristicNotFound,
30 kDescriptorNotFound 29 kDescriptorNotFound
(...skipping 11 matching lines...) Expand all
42 static DOMException* CreateDOMException(BluetoothErrorCode, 41 static DOMException* CreateDOMException(BluetoothErrorCode,
43 const String& detailed_message); 42 const String& detailed_message);
44 43
45 static DOMException* CreateDOMException( 44 static DOMException* CreateDOMException(
46 mojom::blink::WebBluetoothResult error); 45 mojom::blink::WebBluetoothResult error);
47 }; 46 };
48 47
49 } // namespace blink 48 } // namespace blink
50 49
51 #endif // BluetoothError_h 50 #endif // BluetoothError_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698