| OLD | NEW |
| 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 DEVICE_BLUETOOTH_BLUETOOTH_UUID_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_UUID_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_UUID_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_UUID_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/pickle.h" |
| 10 #include "device/bluetooth/bluetooth_export.h" | 11 #include "device/bluetooth/bluetooth_export.h" |
| 11 #include "ipc/ipc_param_traits.h" | 12 #include "ipc/ipc_param_traits.h" |
| 12 | 13 |
| 13 namespace base { | 14 namespace base { |
| 14 class Pickle; | 15 class Pickle; |
| 15 class PickleIterator; | 16 class PickleIterator; |
| 16 } // namespace base | 17 } // namespace base |
| 17 | 18 |
| 18 namespace device { | 19 namespace device { |
| 19 | 20 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 } // namespace device | 105 } // namespace device |
| 105 | 106 |
| 106 namespace IPC { | 107 namespace IPC { |
| 107 | 108 |
| 108 class Message; | 109 class Message; |
| 109 | 110 |
| 110 // Tell the IPC system how to serialize and deserialize a BluetoothUUID. | 111 // Tell the IPC system how to serialize and deserialize a BluetoothUUID. |
| 111 template <> | 112 template <> |
| 112 struct DEVICE_BLUETOOTH_EXPORT ParamTraits<device::BluetoothUUID> { | 113 struct DEVICE_BLUETOOTH_EXPORT ParamTraits<device::BluetoothUUID> { |
| 113 typedef device::BluetoothUUID param_type; | 114 typedef device::BluetoothUUID param_type; |
| 115 static void GetSize(base::PickleSizer* s, const param_type& p); |
| 114 static void Write(base::Pickle* m, const param_type& p); | 116 static void Write(base::Pickle* m, const param_type& p); |
| 115 static bool Read(const base::Pickle* m, | 117 static bool Read(const base::Pickle* m, |
| 116 base::PickleIterator* iter, | 118 base::PickleIterator* iter, |
| 117 param_type* r); | 119 param_type* r); |
| 118 static void Log(const param_type& p, std::string* l); | 120 static void Log(const param_type& p, std::string* l); |
| 119 }; | 121 }; |
| 120 | 122 |
| 121 } // namespace IPC | 123 } // namespace IPC |
| 122 | 124 |
| 123 #endif // DEVICE_BLUETOOTH_BLUETOOTH_UUID_H_ | 125 #endif // DEVICE_BLUETOOTH_BLUETOOTH_UUID_H_ |
| OLD | NEW |