OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/common/render_messages_params.h" | 5 #include "chrome/common/render_messages_params.h" |
6 | 6 |
7 #include "chrome/common/navigation_gesture.h" | 7 #include "chrome/common/navigation_gesture.h" |
8 #include "chrome/common/common_param_traits.h" | 8 #include "chrome/common/common_param_traits.h" |
9 #include "chrome/common/indexed_db_param_traits.h" | 9 #include "chrome/common/indexed_db_param_traits.h" |
10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 is_post(false), | 31 is_post(false), |
32 is_content_filtered(false), | 32 is_content_filtered(false), |
33 was_within_same_page(false), | 33 was_within_same_page(false), |
34 http_status_code(0) { | 34 http_status_code(0) { |
35 } | 35 } |
36 | 36 |
37 ViewHostMsg_FrameNavigate_Params::~ViewHostMsg_FrameNavigate_Params() { | 37 ViewHostMsg_FrameNavigate_Params::~ViewHostMsg_FrameNavigate_Params() { |
38 } | 38 } |
39 | 39 |
40 ViewHostMsg_UpdateRect_Params::ViewHostMsg_UpdateRect_Params() | 40 ViewHostMsg_UpdateRect_Params::ViewHostMsg_UpdateRect_Params() |
41 : dx(0), | 41 : dib_id(0), |
| 42 dib_handle(TransportDIB::DefaultHandleValue()), |
| 43 dx(0), |
42 dy(0), | 44 dy(0), |
43 flags(0) { | 45 flags(0) { |
44 // On windows, bitmap is of type "struct HandleAndSequenceNum" | |
45 memset(&bitmap, 0, sizeof(bitmap)); | |
46 } | 46 } |
47 | 47 |
48 ViewHostMsg_UpdateRect_Params::~ViewHostMsg_UpdateRect_Params() { | 48 ViewHostMsg_UpdateRect_Params::~ViewHostMsg_UpdateRect_Params() { |
49 } | 49 } |
50 | 50 |
51 ViewMsg_ClosePage_Params::ViewMsg_ClosePage_Params() | 51 ViewMsg_ClosePage_Params::ViewMsg_ClosePage_Params() |
52 : closing_process_id(0), | 52 : closing_process_id(0), |
53 closing_route_id(0), | 53 closing_route_id(0), |
54 for_cross_site_transition(false), | 54 for_cross_site_transition(false), |
55 new_render_process_host_id(0), | 55 new_render_process_host_id(0), |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 LogParam(p.is_content_filtered, l); | 828 LogParam(p.is_content_filtered, l); |
829 l->append(", "); | 829 l->append(", "); |
830 LogParam(p.was_within_same_page, l); | 830 LogParam(p.was_within_same_page, l); |
831 l->append(", "); | 831 l->append(", "); |
832 LogParam(p.http_status_code, l); | 832 LogParam(p.http_status_code, l); |
833 l->append(")"); | 833 l->append(")"); |
834 } | 834 } |
835 | 835 |
836 void ParamTraits<ViewHostMsg_UpdateRect_Params>::Write( | 836 void ParamTraits<ViewHostMsg_UpdateRect_Params>::Write( |
837 Message* m, const param_type& p) { | 837 Message* m, const param_type& p) { |
838 WriteParam(m, p.bitmap); | 838 WriteParam(m, p.dib_id); |
| 839 WriteParam(m, p.dib_handle); |
839 WriteParam(m, p.bitmap_rect); | 840 WriteParam(m, p.bitmap_rect); |
840 WriteParam(m, p.dx); | 841 WriteParam(m, p.dx); |
841 WriteParam(m, p.dy); | 842 WriteParam(m, p.dy); |
842 WriteParam(m, p.scroll_rect); | 843 WriteParam(m, p.scroll_rect); |
843 WriteParam(m, p.copy_rects); | 844 WriteParam(m, p.copy_rects); |
844 WriteParam(m, p.view_size); | 845 WriteParam(m, p.view_size); |
845 WriteParam(m, p.plugin_window_moves); | 846 WriteParam(m, p.plugin_window_moves); |
846 WriteParam(m, p.flags); | 847 WriteParam(m, p.flags); |
847 } | 848 } |
848 | 849 |
849 bool ParamTraits<ViewHostMsg_UpdateRect_Params>::Read( | 850 bool ParamTraits<ViewHostMsg_UpdateRect_Params>::Read( |
850 const Message* m, void** iter, param_type* p) { | 851 const Message* m, void** iter, param_type* p) { |
851 return | 852 return |
852 ReadParam(m, iter, &p->bitmap) && | 853 ReadParam(m, iter, &p->dib_id) && |
| 854 ReadParam(m, iter, &p->dib_handle) && |
853 ReadParam(m, iter, &p->bitmap_rect) && | 855 ReadParam(m, iter, &p->bitmap_rect) && |
854 ReadParam(m, iter, &p->dx) && | 856 ReadParam(m, iter, &p->dx) && |
855 ReadParam(m, iter, &p->dy) && | 857 ReadParam(m, iter, &p->dy) && |
856 ReadParam(m, iter, &p->scroll_rect) && | 858 ReadParam(m, iter, &p->scroll_rect) && |
857 ReadParam(m, iter, &p->copy_rects) && | 859 ReadParam(m, iter, &p->copy_rects) && |
858 ReadParam(m, iter, &p->view_size) && | 860 ReadParam(m, iter, &p->view_size) && |
859 ReadParam(m, iter, &p->plugin_window_moves) && | 861 ReadParam(m, iter, &p->plugin_window_moves) && |
860 ReadParam(m, iter, &p->flags); | 862 ReadParam(m, iter, &p->flags); |
861 } | 863 } |
862 | 864 |
863 void ParamTraits<ViewHostMsg_UpdateRect_Params>::Log(const param_type& p, | 865 void ParamTraits<ViewHostMsg_UpdateRect_Params>::Log(const param_type& p, |
864 std::string* l) { | 866 std::string* l) { |
865 l->append("("); | 867 l->append("("); |
866 LogParam(p.bitmap, l); | 868 LogParam(p.dib_id, l); |
| 869 l->append(", "); |
| 870 LogParam(p.dib_handle, l); |
867 l->append(", "); | 871 l->append(", "); |
868 LogParam(p.bitmap_rect, l); | 872 LogParam(p.bitmap_rect, l); |
869 l->append(", "); | 873 l->append(", "); |
870 LogParam(p.dx, l); | 874 LogParam(p.dx, l); |
871 l->append(", "); | 875 l->append(", "); |
872 LogParam(p.dy, l); | 876 LogParam(p.dy, l); |
873 l->append(", "); | 877 l->append(", "); |
874 LogParam(p.scroll_rect, l); | 878 LogParam(p.scroll_rect, l); |
875 l->append(", "); | 879 l->append(", "); |
876 LogParam(p.copy_rects, l); | 880 LogParam(p.copy_rects, l); |
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1919 const param_type& p, | 1923 const param_type& p, |
1920 std::string* l) { | 1924 std::string* l) { |
1921 l->append("("); | 1925 l->append("("); |
1922 LogParam(p.notification_type, l); | 1926 LogParam(p.notification_type, l); |
1923 l->append(", "); | 1927 l->append(", "); |
1924 LogParam(p.acc_obj, l); | 1928 LogParam(p.acc_obj, l); |
1925 l->append(")"); | 1929 l->append(")"); |
1926 } | 1930 } |
1927 | 1931 |
1928 } // namespace IPC | 1932 } // namespace IPC |
OLD | NEW |