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 "remoting/host/screen_resolution.h" | 10 #include "remoting/host/screen_resolution.h" |
11 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | |
12 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" | 11 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
13 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor.h" | |
14 | 12 |
15 namespace IPC { | 13 namespace IPC { |
16 | 14 |
17 template <> | 15 template <> |
18 struct ParamTraits<webrtc::DesktopVector> { | 16 struct ParamTraits<webrtc::DesktopVector> { |
19 typedef webrtc::DesktopVector param_type; | 17 typedef webrtc::DesktopVector param_type; |
20 static void Write(Message* m, const param_type& p); | 18 static void Write(Message* m, const param_type& p); |
21 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 19 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
22 static void Log(const param_type& p, std::string* l); | 20 static void Log(const param_type& p, std::string* l); |
23 }; | 21 }; |
24 | 22 |
25 template <> | 23 template <> |
26 struct ParamTraits<webrtc::DesktopSize> { | 24 struct ParamTraits<webrtc::DesktopSize> { |
27 typedef webrtc::DesktopSize param_type; | 25 typedef webrtc::DesktopSize param_type; |
28 static void Write(Message* m, const param_type& p); | 26 static void Write(Message* m, const param_type& p); |
29 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 27 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
30 static void Log(const param_type& p, std::string* l); | 28 static void Log(const param_type& p, std::string* l); |
31 }; | 29 }; |
32 | 30 |
33 template <> | 31 template <> |
34 struct ParamTraits<webrtc::DesktopRect> { | 32 struct ParamTraits<webrtc::DesktopRect> { |
35 typedef webrtc::DesktopRect param_type; | 33 typedef webrtc::DesktopRect param_type; |
36 static void Write(Message* m, const param_type& p); | 34 static void Write(Message* m, const param_type& p); |
37 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 35 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
38 static void Log(const param_type& p, std::string* l); | 36 static void Log(const param_type& p, std::string* l); |
39 }; | 37 }; |
40 | 38 |
41 template <> | 39 template <> |
42 struct ParamTraits<webrtc::MouseCursor> { | |
43 typedef webrtc::MouseCursor param_type; | |
44 static void Write(Message* m, const param_type& p); | |
45 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | |
46 static void Log(const param_type& p, std::string* l); | |
47 }; | |
48 | |
49 template <> | |
50 struct ParamTraits<remoting::ScreenResolution> { | 40 struct ParamTraits<remoting::ScreenResolution> { |
51 typedef remoting::ScreenResolution param_type; | 41 typedef remoting::ScreenResolution param_type; |
52 static void Write(Message* m, const param_type& p); | 42 static void Write(Message* m, const param_type& p); |
53 static bool Read(const Message* m, PickleIterator* iter, param_type* r); | 43 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
54 static void Log(const param_type& p, std::string* l); | 44 static void Log(const param_type& p, std::string* l); |
55 }; | 45 }; |
56 | 46 |
57 } // namespace IPC | 47 } // namespace IPC |
58 | 48 |
59 #endif // REMOTING_HOST_CHROMOTING_PARAM_TRAITS_H_ | 49 #endif // REMOTING_HOST_CHROMOTING_PARAM_TRAITS_H_ |
OLD | NEW |