| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_COMMON_RENDER_MESSAGES_H_ | 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ |
| 6 #define CHROME_COMMON_RENDER_MESSAGES_H_ | 6 #define CHROME_COMMON_RENDER_MESSAGES_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 } | 1000 } |
| 1001 }; | 1001 }; |
| 1002 | 1002 |
| 1003 template <> | 1003 template <> |
| 1004 struct ParamTraits<WebPluginGeometry> { | 1004 struct ParamTraits<WebPluginGeometry> { |
| 1005 typedef WebPluginGeometry param_type; | 1005 typedef WebPluginGeometry param_type; |
| 1006 static void Write(Message* m, const param_type& p) { | 1006 static void Write(Message* m, const param_type& p) { |
| 1007 WriteParam(m, p.window); | 1007 WriteParam(m, p.window); |
| 1008 WriteParam(m, p.window_rect); | 1008 WriteParam(m, p.window_rect); |
| 1009 WriteParam(m, p.clip_rect); | 1009 WriteParam(m, p.clip_rect); |
| 1010 WriteParam(m, p.cutout_rects); |
| 1010 WriteParam(m, p.visible); | 1011 WriteParam(m, p.visible); |
| 1011 } | 1012 } |
| 1012 static bool Read(const Message* m, void** iter, param_type* p) { | 1013 static bool Read(const Message* m, void** iter, param_type* p) { |
| 1013 return | 1014 return |
| 1014 ReadParam(m, iter, &p->window) && | 1015 ReadParam(m, iter, &p->window) && |
| 1015 ReadParam(m, iter, &p->window_rect) && | 1016 ReadParam(m, iter, &p->window_rect) && |
| 1016 ReadParam(m, iter, &p->clip_rect) && | 1017 ReadParam(m, iter, &p->clip_rect) && |
| 1018 ReadParam(m, iter, &p->cutout_rects) && |
| 1017 ReadParam(m, iter, &p->visible); | 1019 ReadParam(m, iter, &p->visible); |
| 1018 } | 1020 } |
| 1019 static void Log(const param_type& p, std::wstring* l) { | 1021 static void Log(const param_type& p, std::wstring* l) { |
| 1020 l->append(L"("); | 1022 l->append(L"("); |
| 1021 LogParam(p.window, l); | 1023 LogParam(p.window, l); |
| 1022 l->append(L", "); | 1024 l->append(L", "); |
| 1023 LogParam(p.window_rect, l); | 1025 LogParam(p.window_rect, l); |
| 1024 l->append(L", "); | 1026 l->append(L", "); |
| 1025 LogParam(p.clip_rect, l); | 1027 LogParam(p.clip_rect, l); |
| 1026 l->append(L", "); | 1028 l->append(L", "); |
| 1029 LogParam(p.cutout_rects, l); |
| 1030 l->append(L", "); |
| 1027 LogParam(p.visible, l); | 1031 LogParam(p.visible, l); |
| 1028 l->append(L")"); | 1032 l->append(L")"); |
| 1029 } | 1033 } |
| 1030 }; | 1034 }; |
| 1031 | 1035 |
| 1032 // Traits for ViewMsg_GetPlugins_Reply structure to pack/unpack. | 1036 // Traits for ViewMsg_GetPlugins_Reply structure to pack/unpack. |
| 1033 template <> | 1037 template <> |
| 1034 struct ParamTraits<WebPluginMimeType> { | 1038 struct ParamTraits<WebPluginMimeType> { |
| 1035 typedef WebPluginMimeType param_type; | 1039 typedef WebPluginMimeType param_type; |
| 1036 static void Write(Message* m, const param_type& p) { | 1040 static void Write(Message* m, const param_type& p) { |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1633 ReadParam(m, iter, &p->file_contents); | 1637 ReadParam(m, iter, &p->file_contents); |
| 1634 } | 1638 } |
| 1635 static void Log(const param_type& p, std::wstring* l) { | 1639 static void Log(const param_type& p, std::wstring* l) { |
| 1636 l->append(L"<WebDropData>"); | 1640 l->append(L"<WebDropData>"); |
| 1637 } | 1641 } |
| 1638 }; | 1642 }; |
| 1639 | 1643 |
| 1640 } // namespace IPC | 1644 } // namespace IPC |
| 1641 | 1645 |
| 1642 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 1646 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
| OLD | NEW |