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 #include <map> | 10 #include <map> |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 static bool is_restore_ack(int flags) { | 151 static bool is_restore_ack(int flags) { |
152 return (flags & IS_RESTORE_ACK) != 0; | 152 return (flags & IS_RESTORE_ACK) != 0; |
153 } | 153 } |
154 | 154 |
155 static bool is_repaint_ack(int flags) { | 155 static bool is_repaint_ack(int flags) { |
156 return (flags & IS_REPAINT_ACK) != 0; | 156 return (flags & IS_REPAINT_ACK) != 0; |
157 } | 157 } |
158 }; | 158 }; |
159 | 159 |
160 struct ViewHostMsg_PaintRect_Params { | 160 struct ViewHostMsg_PaintRect_Params { |
161 // The bitmap to be painted into the rect given by bitmap_rect. | 161 // The bitmap to be painted into the rects given by paint_rects. |
162 TransportDIB::Id bitmap; | 162 TransportDIB::Id bitmap; |
163 | 163 |
164 // The position and size of the bitmap. | 164 // The position and size of the the bitmap relative to the view port. |
165 gfx::Rect bitmap_rect; | 165 gfx::Rect bitmap_rect; |
166 | 166 |
| 167 // The position and size of the rects where the bitmap has data to be |
| 168 // painted to the view. An empty vector means that the whole bitmap has |
| 169 // data to be painted to the view. |
| 170 std::vector<gfx::Rect> paint_rects; |
| 171 |
167 // The size of the RenderView when this message was generated. This is | 172 // The size of the RenderView when this message was generated. This is |
168 // included so the host knows how large the view is from the perspective of | 173 // included so the host knows how large the view is from the perspective of |
169 // the renderer process. This is necessary in case a resize operation is in | 174 // the renderer process. This is necessary in case a resize operation is in |
170 // progress. | 175 // progress. |
171 gfx::Size view_size; | 176 gfx::Size view_size; |
172 | 177 |
173 // New window locations for plugin child windows. | 178 // New window locations for plugin child windows. |
174 std::vector<WebPluginGeometry> plugin_window_moves; | 179 std::vector<WebPluginGeometry> plugin_window_moves; |
175 | 180 |
176 // The following describes the various bits that may be set in flags: | 181 // The following describes the various bits that may be set in flags: |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 } | 856 } |
852 }; | 857 }; |
853 | 858 |
854 // Traits for ViewHostMsg_PaintRect_Params structure to pack/unpack. | 859 // Traits for ViewHostMsg_PaintRect_Params structure to pack/unpack. |
855 template <> | 860 template <> |
856 struct ParamTraits<ViewHostMsg_PaintRect_Params> { | 861 struct ParamTraits<ViewHostMsg_PaintRect_Params> { |
857 typedef ViewHostMsg_PaintRect_Params param_type; | 862 typedef ViewHostMsg_PaintRect_Params param_type; |
858 static void Write(Message* m, const param_type& p) { | 863 static void Write(Message* m, const param_type& p) { |
859 WriteParam(m, p.bitmap); | 864 WriteParam(m, p.bitmap); |
860 WriteParam(m, p.bitmap_rect); | 865 WriteParam(m, p.bitmap_rect); |
| 866 WriteParam(m, p.paint_rects); |
861 WriteParam(m, p.view_size); | 867 WriteParam(m, p.view_size); |
862 WriteParam(m, p.plugin_window_moves); | 868 WriteParam(m, p.plugin_window_moves); |
863 WriteParam(m, p.flags); | 869 WriteParam(m, p.flags); |
864 } | 870 } |
865 static bool Read(const Message* m, void** iter, param_type* p) { | 871 static bool Read(const Message* m, void** iter, param_type* p) { |
866 return | 872 return |
867 ReadParam(m, iter, &p->bitmap) && | 873 ReadParam(m, iter, &p->bitmap) && |
868 ReadParam(m, iter, &p->bitmap_rect) && | 874 ReadParam(m, iter, &p->bitmap_rect) && |
| 875 ReadParam(m, iter, &p->paint_rects) && |
869 ReadParam(m, iter, &p->view_size) && | 876 ReadParam(m, iter, &p->view_size) && |
870 ReadParam(m, iter, &p->plugin_window_moves) && | 877 ReadParam(m, iter, &p->plugin_window_moves) && |
871 ReadParam(m, iter, &p->flags); | 878 ReadParam(m, iter, &p->flags); |
872 } | 879 } |
873 static void Log(const param_type& p, std::wstring* l) { | 880 static void Log(const param_type& p, std::wstring* l) { |
874 l->append(L"("); | 881 l->append(L"("); |
875 LogParam(p.bitmap, l); | 882 LogParam(p.bitmap, l); |
876 l->append(L", "); | 883 l->append(L", "); |
877 LogParam(p.bitmap_rect, l); | 884 LogParam(p.bitmap_rect, l); |
878 l->append(L", "); | 885 l->append(L", "); |
| 886 LogParam(p.paint_rects, l); |
| 887 l->append(L", "); |
879 LogParam(p.view_size, l); | 888 LogParam(p.view_size, l); |
880 l->append(L", "); | 889 l->append(L", "); |
881 LogParam(p.plugin_window_moves, l); | 890 LogParam(p.plugin_window_moves, l); |
882 l->append(L", "); | 891 l->append(L", "); |
883 LogParam(p.flags, l); | 892 LogParam(p.flags, l); |
884 l->append(L")"); | 893 l->append(L")"); |
885 } | 894 } |
886 }; | 895 }; |
887 | 896 |
888 // Traits for ViewHostMsg_ScrollRect_Params structure to pack/unpack. | 897 // Traits for ViewHostMsg_ScrollRect_Params structure to pack/unpack. |
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 } | 1891 } |
1883 }; | 1892 }; |
1884 | 1893 |
1885 } // namespace IPC | 1894 } // namespace IPC |
1886 | 1895 |
1887 | 1896 |
1888 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 1897 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
1889 #include "chrome/common/ipc_message_macros.h" | 1898 #include "chrome/common/ipc_message_macros.h" |
1890 | 1899 |
1891 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 1900 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
OLD | NEW |