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" |
| 11 #include "net/base/ip_endpoint.h" |
10 #include "remoting/host/screen_resolution.h" | 12 #include "remoting/host/screen_resolution.h" |
11 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 13 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
12 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" | 14 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
13 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor.h" | 15 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor.h" |
14 | 16 |
15 namespace IPC { | 17 namespace IPC { |
16 | 18 |
17 template <> | 19 template <> |
18 struct ParamTraits<webrtc::DesktopVector> { | 20 struct ParamTraits<webrtc::DesktopVector> { |
19 typedef webrtc::DesktopVector param_type; | 21 typedef webrtc::DesktopVector param_type; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 template <> | 59 template <> |
58 struct ParamTraits<remoting::ScreenResolution> { | 60 struct ParamTraits<remoting::ScreenResolution> { |
59 typedef remoting::ScreenResolution param_type; | 61 typedef remoting::ScreenResolution param_type; |
60 static void Write(base::Pickle* m, const param_type& p); | 62 static void Write(base::Pickle* m, const param_type& p); |
61 static bool Read(const base::Pickle* m, | 63 static bool Read(const base::Pickle* m, |
62 base::PickleIterator* iter, | 64 base::PickleIterator* iter, |
63 param_type* r); | 65 param_type* r); |
64 static void Log(const param_type& p, std::string* l); | 66 static void Log(const param_type& p, std::string* l); |
65 }; | 67 }; |
66 | 68 |
| 69 template <> |
| 70 struct ParamTraits<net::IPAddress> { |
| 71 typedef net::IPAddress param_type; |
| 72 static void Write(base::Pickle* m, const param_type& p); |
| 73 static bool Read(const base::Pickle* m, |
| 74 base::PickleIterator* iter, |
| 75 param_type* p); |
| 76 static void Log(const param_type& p, std::string* l); |
| 77 }; |
| 78 |
| 79 template <> |
| 80 struct ParamTraits<net::IPEndPoint> { |
| 81 typedef net::IPEndPoint param_type; |
| 82 static void Write(base::Pickle* m, const param_type& p); |
| 83 static bool Read(const base::Pickle* m, |
| 84 base::PickleIterator* iter, |
| 85 param_type* p); |
| 86 static void Log(const param_type& p, std::string* l); |
| 87 }; |
| 88 |
67 } // namespace IPC | 89 } // namespace IPC |
68 | 90 |
69 #endif // REMOTING_HOST_CHROMOTING_PARAM_TRAITS_H_ | 91 #endif // REMOTING_HOST_CHROMOTING_PARAM_TRAITS_H_ |
OLD | NEW |