Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Side by Side Diff: chrome/common/render_messages_params.cc

Issue 6705012: Move the rest of the content browser->renderer messages to content. Also move drag related messa... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/render_messages_params.h ('k') | chrome/common/webkit_param_traits.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/common_param_traits.h" 7 #include "chrome/common/common_param_traits.h"
8 #include "chrome/common/extensions/extension_constants.h" 8 #include "chrome/common/extensions/extension_constants.h"
9 #include "chrome/common/render_messages.h" 9 #include "chrome/common/render_messages.h"
10 #include "net/base/upload_data.h" 10 #include "net/base/upload_data.h"
(...skipping 17 matching lines...) Expand all
28 : dx(0), 28 : dx(0),
29 dy(0), 29 dy(0),
30 flags(0) { 30 flags(0) {
31 // On windows, bitmap is of type "struct HandleAndSequenceNum" 31 // On windows, bitmap is of type "struct HandleAndSequenceNum"
32 memset(&bitmap, 0, sizeof(bitmap)); 32 memset(&bitmap, 0, sizeof(bitmap));
33 } 33 }
34 34
35 ViewHostMsg_UpdateRect_Params::~ViewHostMsg_UpdateRect_Params() { 35 ViewHostMsg_UpdateRect_Params::~ViewHostMsg_UpdateRect_Params() {
36 } 36 }
37 37
38 ViewMsg_ClosePage_Params::ViewMsg_ClosePage_Params()
39 : closing_process_id(0),
40 closing_route_id(0),
41 for_cross_site_transition(false),
42 new_render_process_host_id(0),
43 new_request_id(0) {
44 }
45
46 ViewMsg_ClosePage_Params::~ViewMsg_ClosePage_Params() {
47 }
48
49 ViewMsg_Print_Params::ViewMsg_Print_Params() 38 ViewMsg_Print_Params::ViewMsg_Print_Params()
50 : margin_top(0), 39 : margin_top(0),
51 margin_left(0), 40 margin_left(0),
52 dpi(0), 41 dpi(0),
53 min_shrink(0), 42 min_shrink(0),
54 max_shrink(0), 43 max_shrink(0),
55 desired_dpi(0), 44 desired_dpi(0),
56 document_cookie(0), 45 document_cookie(0),
57 selection_only(false), 46 selection_only(false),
58 supports_alpha_blend(true) { 47 supports_alpha_blend(true) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 const std::string& code, 140 const std::string& code,
152 bool all_frames) 141 bool all_frames)
153 : request_id(request_id), extension_id(extension_id), 142 : request_id(request_id), extension_id(extension_id),
154 is_javascript(is_javascript), 143 is_javascript(is_javascript),
155 code(code), all_frames(all_frames) { 144 code(code), all_frames(all_frames) {
156 } 145 }
157 146
158 ViewMsg_ExecuteCode_Params::~ViewMsg_ExecuteCode_Params() { 147 ViewMsg_ExecuteCode_Params::~ViewMsg_ExecuteCode_Params() {
159 } 148 }
160 149
161 ViewHostMsg_CreateWorker_Params::ViewHostMsg_CreateWorker_Params()
162 : is_shared(false),
163 document_id(0),
164 render_view_route_id(0),
165 route_id(0),
166 parent_appcache_host_id(0),
167 script_resource_appcache_id(0) {
168 }
169
170 ViewHostMsg_CreateWorker_Params::~ViewHostMsg_CreateWorker_Params() {
171 }
172
173 ViewHostMsg_CreateWindow_Params::ViewHostMsg_CreateWindow_Params() 150 ViewHostMsg_CreateWindow_Params::ViewHostMsg_CreateWindow_Params()
174 : opener_id(0), 151 : opener_id(0),
175 user_gesture(false), 152 user_gesture(false),
176 window_container_type(WINDOW_CONTAINER_TYPE_NORMAL), 153 window_container_type(WINDOW_CONTAINER_TYPE_NORMAL),
177 session_storage_namespace_id(0), 154 session_storage_namespace_id(0),
178 opener_frame_id(0) { 155 opener_frame_id(0) {
179 } 156 }
180 157
181 ViewHostMsg_CreateWindow_Params::~ViewHostMsg_CreateWindow_Params() { 158 ViewHostMsg_CreateWindow_Params::~ViewHostMsg_CreateWindow_Params() {
182 } 159 }
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 LogParam(p.view_size, l); 558 LogParam(p.view_size, l);
582 l->append(", "); 559 l->append(", ");
583 LogParam(p.resizer_rect, l); 560 LogParam(p.resizer_rect, l);
584 l->append(", "); 561 l->append(", ");
585 LogParam(p.plugin_window_moves, l); 562 LogParam(p.plugin_window_moves, l);
586 l->append(", "); 563 l->append(", ");
587 LogParam(p.flags, l); 564 LogParam(p.flags, l);
588 l->append(")"); 565 l->append(")");
589 } 566 }
590 567
591 void ParamTraits<ViewMsg_ClosePage_Params>::Write(Message* m,
592 const param_type& p) {
593 WriteParam(m, p.closing_process_id);
594 WriteParam(m, p.closing_route_id);
595 WriteParam(m, p.for_cross_site_transition);
596 WriteParam(m, p.new_render_process_host_id);
597 WriteParam(m, p.new_request_id);
598 }
599
600 bool ParamTraits<ViewMsg_ClosePage_Params>::Read(const Message* m,
601 void** iter,
602 param_type* r) {
603 return ReadParam(m, iter, &r->closing_process_id) &&
604 ReadParam(m, iter, &r->closing_route_id) &&
605 ReadParam(m, iter, &r->for_cross_site_transition) &&
606 ReadParam(m, iter, &r->new_render_process_host_id) &&
607 ReadParam(m, iter, &r->new_request_id);
608 }
609
610 void ParamTraits<ViewMsg_ClosePage_Params>::Log(const param_type& p,
611 std::string* l) {
612 l->append("(");
613 LogParam(p.closing_process_id, l);
614 l->append(", ");
615 LogParam(p.closing_route_id, l);
616 l->append(", ");
617 LogParam(p.for_cross_site_transition, l);
618 l->append(", ");
619 LogParam(p.new_render_process_host_id, l);
620 l->append(", ");
621 LogParam(p.new_request_id, l);
622 l->append(")");
623 }
624
625 void ParamTraits<ViewMsg_Print_Params>::Write(Message* m, const param_type& p) { 568 void ParamTraits<ViewMsg_Print_Params>::Write(Message* m, const param_type& p) {
626 WriteParam(m, p.page_size); 569 WriteParam(m, p.page_size);
627 WriteParam(m, p.printable_size); 570 WriteParam(m, p.printable_size);
628 WriteParam(m, p.margin_top); 571 WriteParam(m, p.margin_top);
629 WriteParam(m, p.margin_left); 572 WriteParam(m, p.margin_left);
630 WriteParam(m, p.dpi); 573 WriteParam(m, p.dpi);
631 WriteParam(m, p.min_shrink); 574 WriteParam(m, p.min_shrink);
632 WriteParam(m, p.max_shrink); 575 WriteParam(m, p.max_shrink);
633 WriteParam(m, p.desired_dpi); 576 WriteParam(m, p.desired_dpi);
634 WriteParam(m, p.document_cookie); 577 WriteParam(m, p.document_cookie);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 ReadParam(m, iter, &p->is_javascript) && 745 ReadParam(m, iter, &p->is_javascript) &&
803 ReadParam(m, iter, &p->code) && 746 ReadParam(m, iter, &p->code) &&
804 ReadParam(m, iter, &p->all_frames); 747 ReadParam(m, iter, &p->all_frames);
805 } 748 }
806 749
807 void ParamTraits<ViewMsg_ExecuteCode_Params>::Log(const param_type& p, 750 void ParamTraits<ViewMsg_ExecuteCode_Params>::Log(const param_type& p,
808 std::string* l) { 751 std::string* l) {
809 l->append("<ViewMsg_ExecuteCode_Params>"); 752 l->append("<ViewMsg_ExecuteCode_Params>");
810 } 753 }
811 754
812 void ParamTraits<ViewHostMsg_CreateWorker_Params>::Write(Message* m,
813 const param_type& p) {
814 WriteParam(m, p.url);
815 WriteParam(m, p.is_shared);
816 WriteParam(m, p.name);
817 WriteParam(m, p.document_id);
818 WriteParam(m, p.render_view_route_id);
819 WriteParam(m, p.route_id);
820 WriteParam(m, p.parent_appcache_host_id);
821 WriteParam(m, p.script_resource_appcache_id);
822 }
823
824 bool ParamTraits<ViewHostMsg_CreateWorker_Params>::Read(const Message* m,
825 void** iter,
826 param_type* p) {
827 return
828 ReadParam(m, iter, &p->url) &&
829 ReadParam(m, iter, &p->is_shared) &&
830 ReadParam(m, iter, &p->name) &&
831 ReadParam(m, iter, &p->document_id) &&
832 ReadParam(m, iter, &p->render_view_route_id) &&
833 ReadParam(m, iter, &p->route_id) &&
834 ReadParam(m, iter, &p->parent_appcache_host_id) &&
835 ReadParam(m, iter, &p->script_resource_appcache_id);
836 }
837
838 void ParamTraits<ViewHostMsg_CreateWorker_Params>::Log(const param_type& p,
839 std::string* l) {
840 l->append("(");
841 LogParam(p.url, l);
842 l->append(", ");
843 LogParam(p.is_shared, l);
844 l->append(", ");
845 LogParam(p.name, l);
846 l->append(", ");
847 LogParam(p.document_id, l);
848 l->append(", ");
849 LogParam(p.render_view_route_id, l);
850 l->append(",");
851 LogParam(p.route_id, l);
852 l->append(", ");
853 LogParam(p.parent_appcache_host_id, l);
854 l->append(",");
855 LogParam(p.script_resource_appcache_id, l);
856 l->append(")");
857 }
858
859 void ParamTraits<ViewHostMsg_CreateWindow_Params>::Write(Message* m, 755 void ParamTraits<ViewHostMsg_CreateWindow_Params>::Write(Message* m,
860 const param_type& p) { 756 const param_type& p) {
861 WriteParam(m, p.opener_id); 757 WriteParam(m, p.opener_id);
862 WriteParam(m, p.user_gesture); 758 WriteParam(m, p.user_gesture);
863 WriteParam(m, p.window_container_type); 759 WriteParam(m, p.window_container_type);
864 WriteParam(m, p.session_storage_namespace_id); 760 WriteParam(m, p.session_storage_namespace_id);
865 WriteParam(m, p.frame_name); 761 WriteParam(m, p.frame_name);
866 WriteParam(m, p.opener_frame_id); 762 WriteParam(m, p.opener_frame_id);
867 WriteParam(m, p.opener_url); 763 WriteParam(m, p.opener_url);
868 WriteParam(m, p.opener_security_origin); 764 WriteParam(m, p.opener_security_origin);
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 l->append(", "); 992 l->append(", ");
1097 LogParam(p.tag_name, l); 993 LogParam(p.tag_name, l);
1098 l->append(", "); 994 l->append(", ");
1099 LogParam(p.parent, l); 995 LogParam(p.parent, l);
1100 l->append(", "); 996 l->append(", ");
1101 LogParam(p.children, l); 997 LogParam(p.children, l);
1102 l->append(")"); 998 l->append(")");
1103 } 999 }
1104 1000
1105 } // namespace IPC 1001 } // namespace IPC
OLDNEW
« no previous file with comments | « chrome/common/render_messages_params.h ('k') | chrome/common/webkit_param_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698