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

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

Issue 2728813002: bluetooth: Improve error message for retrieving Descriptors when disconnecting (Closed)
Patch Set: Fix conflict error Created 3 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 unified diff | Download patch
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 "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.moj om-blink.h" 9 #include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.moj om-blink.h"
10 #include "wtf/Allocator.h" 10 #include "wtf/Allocator.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. 15 // TODO(crbug.com/684445): Add DescriptorsRetrieval.
16 enum class BluetoothOperation { 16 enum class BluetoothOperation {
17 ServicesRetrieval, 17 ServicesRetrieval,
18 CharacteristicsRetrieval, 18 CharacteristicsRetrieval,
19 DescriptorsRetrieval,
19 GATT, 20 GATT,
20 }; 21 };
21 22
22 // These error codes requires detailed error messages. 23 // These error codes requires detailed error messages.
23 enum class BluetoothErrorCode { 24 enum class BluetoothErrorCode {
24 InvalidService, 25 InvalidService,
25 InvalidCharacteristic, 26 InvalidCharacteristic,
26 InvalidDescriptor, 27 InvalidDescriptor,
27 ServiceNotFound, 28 ServiceNotFound,
28 CharacteristicNotFound, 29 CharacteristicNotFound,
(...skipping 12 matching lines...) Expand all
41 static DOMException* createDOMException(BluetoothErrorCode, 42 static DOMException* createDOMException(BluetoothErrorCode,
42 const String& detailedMessage); 43 const String& detailedMessage);
43 44
44 static DOMException* createDOMException( 45 static DOMException* createDOMException(
45 mojom::blink::WebBluetoothResult error); 46 mojom::blink::WebBluetoothResult error);
46 }; 47 };
47 48
48 } // namespace blink 49 } // namespace blink
49 50
50 #endif // BluetoothError_h 51 #endif // BluetoothError_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698