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

Unified Diff: device/bluetooth/public/interfaces/gatt_result_enum_traits.h

Issue 2627243002: bluetooth: Add control for reading/writing of characteristics to internals page. (Closed)
Patch Set: Remove TypeConverter, add EnumTraits for GattResult Created 3 years, 11 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: device/bluetooth/public/interfaces/gatt_result_enum_traits.h
diff --git a/device/bluetooth/public/interfaces/gatt_result_enum_traits.h b/device/bluetooth/public/interfaces/gatt_result_enum_traits.h
new file mode 100644
index 0000000000000000000000000000000000000000..b4ecf61f59031e399088b1cba976df8d39cb410a
--- /dev/null
+++ b/device/bluetooth/public/interfaces/gatt_result_enum_traits.h
@@ -0,0 +1,23 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DEVICE_BLUETOOTH_GATT_RESULT_STRUCT_TRAITS_H_
dcheng 2017/01/26 19:32:25 Please name this file _struct_traits.h so OWNERS r
+#define DEVICE_BLUETOOTH_GATT_RESULT_STRUCT_TRAITS_H_
+
+#include "device/bluetooth/bluetooth_gatt_service.h"
+#include "device/bluetooth/public/interfaces/device.mojom.h"
+#include "mojo/public/cpp/bindings/enum_traits.h"
+
+namespace mojo {
+
+template <>
+struct EnumTraits<bluetooth::mojom::GattResult,
+ device::BluetoothGattService::GattErrorCode> {
+ static bluetooth::mojom::GattResult ToMojom(
+ const device::BluetoothGattService::GattErrorCode& input);
+};
+
+} // namespace mojo
+
+#endif // DEVICE_BLUETOOTH_GATT_RESULT_STRUCT_TRAITS_H_

Powered by Google App Engine
This is Rietveld 408576698