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

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

Issue 2110813002: bluetooth: Move First Device Chooser to tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: 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 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 #include "modules/bluetooth/BluetoothError.h" 5 #include "modules/bluetooth/BluetoothError.h"
6 6
7 #include "core/dom/DOMException.h" 7 #include "core/dom/DOMException.h"
8 #include "core/dom/ExceptionCode.h" 8 #include "core/dom/ExceptionCode.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 30 matching lines...) Expand all
41 MAP_ERROR(CONNECT_UNKNOWN_ERROR, NetworkError, "Unknown error when conne cting to the device."); 41 MAP_ERROR(CONNECT_UNKNOWN_ERROR, NetworkError, "Unknown error when conne cting to the device.");
42 MAP_ERROR(CONNECT_UNKNOWN_FAILURE, NetworkError, "Connection failed for unknown reason."); 42 MAP_ERROR(CONNECT_UNKNOWN_FAILURE, NetworkError, "Connection failed for unknown reason.");
43 MAP_ERROR(CONNECT_UNSUPPORTED_DEVICE, NetworkError, "Unsupported device. "); 43 MAP_ERROR(CONNECT_UNSUPPORTED_DEVICE, NetworkError, "Unsupported device. ");
44 MAP_ERROR(CONNECT_WRITE_NOT_PERMITTED, NetworkError, "GATT write operati on is not permitted."); 44 MAP_ERROR(CONNECT_WRITE_NOT_PERMITTED, NetworkError, "GATT write operati on is not permitted.");
45 MAP_ERROR(DEVICE_NO_LONGER_IN_RANGE, NetworkError, "Bluetooth Device is no longer in range."); 45 MAP_ERROR(DEVICE_NO_LONGER_IN_RANGE, NetworkError, "Bluetooth Device is no longer in range.");
46 MAP_ERROR(GATT_NOT_PAIRED, NetworkError, "GATT Error: Not paired."); 46 MAP_ERROR(GATT_NOT_PAIRED, NetworkError, "GATT Error: Not paired.");
47 MAP_ERROR(GATT_OPERATION_IN_PROGRESS, NetworkError, "GATT operation alre ady in progress."); 47 MAP_ERROR(GATT_OPERATION_IN_PROGRESS, NetworkError, "GATT operation alre ady in progress.");
48 MAP_ERROR(UNTRANSLATED_CONNECT_ERROR_CODE, NetworkError, "Unknown Connec tErrorCode."); 48 MAP_ERROR(UNTRANSLATED_CONNECT_ERROR_CODE, NetworkError, "Unknown Connec tErrorCode.");
49 49
50 // NotFoundErrors: 50 // NotFoundErrors:
51 MAP_ERROR(WEB_BLUETOOTH_NOT_SUPPORTED, NotFoundError, "Web Bluetooth is not supported on this platform. For a list of supported platforms see: https://g oo.gl/J6ASzs");
51 MAP_ERROR(NO_BLUETOOTH_ADAPTER, NotFoundError, "Bluetooth adapter not av ailable."); 52 MAP_ERROR(NO_BLUETOOTH_ADAPTER, NotFoundError, "Bluetooth adapter not av ailable.");
52 MAP_ERROR(CHOSEN_DEVICE_VANISHED, NotFoundError, "User selected a device that doesn't exist anymore."); 53 MAP_ERROR(CHOSEN_DEVICE_VANISHED, NotFoundError, "User selected a device that doesn't exist anymore.");
53 MAP_ERROR(CHOOSER_CANCELLED, NotFoundError, "User cancelled the requestD evice() chooser."); 54 MAP_ERROR(CHOOSER_CANCELLED, NotFoundError, "User cancelled the requestD evice() chooser.");
54 MAP_ERROR(CHOOSER_NOT_SHOWN_API_GLOBALLY_DISABLED, NotFoundError, "Web B luetooth API globally disabled."); 55 MAP_ERROR(CHOOSER_NOT_SHOWN_API_GLOBALLY_DISABLED, NotFoundError, "Web B luetooth API globally disabled.");
55 MAP_ERROR(CHOOSER_NOT_SHOWN_API_LOCALLY_DISABLED, NotFoundError, "User o r their enterprise policy has disabled Web Bluetooth."); 56 MAP_ERROR(CHOOSER_NOT_SHOWN_API_LOCALLY_DISABLED, NotFoundError, "User o r their enterprise policy has disabled Web Bluetooth.");
56 MAP_ERROR(CHOOSER_NOT_SHOWN_USER_DENIED_PERMISSION_TO_SCAN, NotFoundErro r, "User denied the browser permission to scan for Bluetooth devices."); 57 MAP_ERROR(CHOOSER_NOT_SHOWN_USER_DENIED_PERMISSION_TO_SCAN, NotFoundErro r, "User denied the browser permission to scan for Bluetooth devices.");
57 MAP_ERROR(SERVICE_NOT_FOUND, NotFoundError, "No Services with specified UUID found in Device."); 58 MAP_ERROR(SERVICE_NOT_FOUND, NotFoundError, "No Services with specified UUID found in Device.");
58 MAP_ERROR(NO_SERVICES_FOUND, NotFoundError, "No Services found in device ."); 59 MAP_ERROR(NO_SERVICES_FOUND, NotFoundError, "No Services found in device .");
59 MAP_ERROR(CHARACTERISTIC_NOT_FOUND, NotFoundError, "No Characteristics w ith specified UUID found in Service."); 60 MAP_ERROR(CHARACTERISTIC_NOT_FOUND, NotFoundError, "No Characteristics w ith specified UUID found in Service.");
60 MAP_ERROR(NO_CHARACTERISTICS_FOUND, NotFoundError, "No Characteristics f ound in service."); 61 MAP_ERROR(NO_CHARACTERISTICS_FOUND, NotFoundError, "No Characteristics f ound in service.");
(...skipping 16 matching lines...) Expand all
77 MAP_ERROR(REQUEST_DEVICE_WITHOUT_FRAME, SecurityError, "No window to sho w the requestDevice() dialog."); 78 MAP_ERROR(REQUEST_DEVICE_WITHOUT_FRAME, SecurityError, "No window to sho w the requestDevice() dialog.");
78 79
79 #undef MAP_ERROR 80 #undef MAP_ERROR
80 } 81 }
81 82
82 ASSERT_NOT_REACHED(); 83 ASSERT_NOT_REACHED();
83 return DOMException::create(UnknownError); 84 return DOMException::create(UnknownError);
84 } 85 }
85 86
86 } // namespace blink 87 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698