OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 REMOTING_HOST_CHROMOTING_PARAM_TRAITS_H_ | 5 #ifndef REMOTING_HOST_CHROMOTING_PARAM_TRAITS_H_ |
6 #define REMOTING_HOST_CHROMOTING_PARAM_TRAITS_H_ | 6 #define REMOTING_HOST_CHROMOTING_PARAM_TRAITS_H_ |
7 | 7 |
8 #include "ipc/ipc_message.h" | 8 #include "ipc/ipc_message.h" |
9 #include "ipc/ipc_param_traits.h" | 9 #include "ipc/ipc_param_traits.h" |
10 #include "net/base/ip_address.h" | 10 #include "net/base/ip_address.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 template <> | 85 template <> |
86 struct ParamTraits<remoting::DesktopEnvironmentOptions> { | 86 struct ParamTraits<remoting::DesktopEnvironmentOptions> { |
87 typedef remoting::DesktopEnvironmentOptions param_type; | 87 typedef remoting::DesktopEnvironmentOptions param_type; |
88 static void Write(base::Pickle* m, const param_type& p); | 88 static void Write(base::Pickle* m, const param_type& p); |
89 static bool Read(const base::Pickle* m, | 89 static bool Read(const base::Pickle* m, |
90 base::PickleIterator* iter, | 90 base::PickleIterator* iter, |
91 param_type* p); | 91 param_type* p); |
92 static void Log(const param_type& p, std::string* l); | 92 static void Log(const param_type& p, std::string* l); |
93 }; | 93 }; |
94 | 94 |
95 // Serializes and deserializes AggregatedProcessResourceUsage. This ParamTraits | 95 template <> |
96 // specialization does not handle AggregatedProcessResourceUsage::usages(). | 96 struct ParamTraits<remoting::protocol::ProcessResourceUsage> { |
| 97 typedef remoting::protocol::ProcessResourceUsage param_type; |
| 98 static void GetSize(base::PickleSizer* s, const param_type& p); |
| 99 static void Write(base::Pickle* m, const param_type& p); |
| 100 static bool Read(const base::Pickle* m, |
| 101 base::PickleIterator* iter, |
| 102 param_type* p); |
| 103 static void Log(const param_type& p, std::string* l); |
| 104 }; |
| 105 |
97 template <> | 106 template <> |
98 struct ParamTraits<remoting::protocol::AggregatedProcessResourceUsage> { | 107 struct ParamTraits<remoting::protocol::AggregatedProcessResourceUsage> { |
99 typedef remoting::protocol::AggregatedProcessResourceUsage param_type; | 108 typedef remoting::protocol::AggregatedProcessResourceUsage param_type; |
| 109 static void GetSize(base::PickleSizer* s, const param_type& p); |
100 static void Write(base::Pickle* m, const param_type& p); | 110 static void Write(base::Pickle* m, const param_type& p); |
101 static bool Read(const base::Pickle* m, | 111 static bool Read(const base::Pickle* m, |
102 base::PickleIterator* iter, | 112 base::PickleIterator* iter, |
103 param_type* p); | 113 param_type* p); |
104 static void Log(const param_type& p, std::string* l); | 114 static void Log(const param_type& p, std::string* l); |
105 }; | 115 }; |
106 | 116 |
107 } // namespace IPC | 117 } // namespace IPC |
108 | 118 |
109 #endif // REMOTING_HOST_CHROMOTING_PARAM_TRAITS_H_ | 119 #endif // REMOTING_HOST_CHROMOTING_PARAM_TRAITS_H_ |
OLD | NEW |