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