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

Unified Diff: extensions/browser/api/bluetooth/bluetooth_api_utils.cc

Issue 2394473005: Move enum BluetoothDevice::DeviceType out of BluetoothDevice class. (Closed)
Patch Set: Created 4 years, 2 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: extensions/browser/api/bluetooth/bluetooth_api_utils.cc
diff --git a/extensions/browser/api/bluetooth/bluetooth_api_utils.cc b/extensions/browser/api/bluetooth/bluetooth_api_utils.cc
index 7f5aa8d48a1a2b49597501cbc594abdd1087225d..b00d26459e357ddd46c84868aa2435bdda184de8 100644
--- a/extensions/browser/api/bluetooth/bluetooth_api_utils.cc
+++ b/extensions/browser/api/bluetooth/bluetooth_api_utils.cc
@@ -13,6 +13,7 @@
namespace bluetooth = extensions::api::bluetooth;
using device::BluetoothDevice;
+using device::BluetoothDeviceType;
using bluetooth::VendorIdSource;
namespace {
@@ -35,49 +36,49 @@ bool ConvertVendorIDSourceToApi(const BluetoothDevice::VendorIDSource& input,
}
}
-bool ConvertDeviceTypeToApi(const BluetoothDevice::DeviceType& input,
+bool ConvertDeviceTypeToApi(const BluetoothDeviceType& input,
bluetooth::DeviceType* output) {
switch (input) {
- case BluetoothDevice::DEVICE_UNKNOWN:
+ case BluetoothDeviceType::UNKNOWN:
*output = bluetooth::DEVICE_TYPE_NONE;
return true;
- case BluetoothDevice::DEVICE_COMPUTER:
+ case BluetoothDeviceType::COMPUTER:
*output = bluetooth::DEVICE_TYPE_COMPUTER;
return true;
- case BluetoothDevice::DEVICE_PHONE:
+ case BluetoothDeviceType::PHONE:
*output = bluetooth::DEVICE_TYPE_PHONE;
return true;
- case BluetoothDevice::DEVICE_MODEM:
+ case BluetoothDeviceType::MODEM:
*output = bluetooth::DEVICE_TYPE_MODEM;
return true;
- case BluetoothDevice::DEVICE_AUDIO:
+ case BluetoothDeviceType::AUDIO:
*output = bluetooth::DEVICE_TYPE_AUDIO;
return true;
- case BluetoothDevice::DEVICE_CAR_AUDIO:
+ case BluetoothDeviceType::CAR_AUDIO:
*output = bluetooth::DEVICE_TYPE_CARAUDIO;
return true;
- case BluetoothDevice::DEVICE_VIDEO:
+ case BluetoothDeviceType::VIDEO:
*output = bluetooth::DEVICE_TYPE_VIDEO;
return true;
- case BluetoothDevice::DEVICE_PERIPHERAL:
+ case BluetoothDeviceType::PERIPHERAL:
*output = bluetooth::DEVICE_TYPE_PERIPHERAL;
return true;
- case BluetoothDevice::DEVICE_JOYSTICK:
+ case BluetoothDeviceType::JOYSTICK:
*output = bluetooth::DEVICE_TYPE_JOYSTICK;
return true;
- case BluetoothDevice::DEVICE_GAMEPAD:
+ case BluetoothDeviceType::GAMEPAD:
*output = bluetooth::DEVICE_TYPE_GAMEPAD;
return true;
- case BluetoothDevice::DEVICE_KEYBOARD:
+ case BluetoothDeviceType::KEYBOARD:
*output = bluetooth::DEVICE_TYPE_KEYBOARD;
return true;
- case BluetoothDevice::DEVICE_MOUSE:
+ case BluetoothDeviceType::MOUSE:
*output = bluetooth::DEVICE_TYPE_MOUSE;
return true;
- case BluetoothDevice::DEVICE_TABLET:
+ case BluetoothDeviceType::TABLET:
*output = bluetooth::DEVICE_TYPE_TABLET;
return true;
- case BluetoothDevice::DEVICE_KEYBOARD_MOUSE_COMBO:
+ case BluetoothDeviceType::KEYBOARD_MOUSE_COMBO:
*output = bluetooth::DEVICE_TYPE_KEYBOARDMOUSECOMBO;
return true;
default:
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_device.cc ('k') | extensions/browser/api/bluetooth/bluetooth_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698