| OLD | NEW |
| 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/common_param_traits.h" | 5 #include "chrome/common/common_param_traits.h" |
| 6 #include "content/common/common_param_traits.h" | 6 #include "content/common/common_param_traits.h" |
| 7 | 7 |
| 8 #define IPC_MESSAGE_IMPL | 8 #define IPC_MESSAGE_IMPL |
| 9 #include "chrome/common/automation_messages.h" | 9 #include "chrome/common/automation_messages.h" |
| 10 | 10 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 : screen_x(0), | 127 : screen_x(0), |
| 128 screen_y(0) { | 128 screen_y(0) { |
| 129 } | 129 } |
| 130 | 130 |
| 131 MiniContextMenuParams::MiniContextMenuParams(int in_screen_x, | 131 MiniContextMenuParams::MiniContextMenuParams(int in_screen_x, |
| 132 int in_screen_y, | 132 int in_screen_y, |
| 133 const GURL& in_link_url, | 133 const GURL& in_link_url, |
| 134 const GURL& in_unfiltered_link_url, | 134 const GURL& in_unfiltered_link_url, |
| 135 const GURL& in_src_url, | 135 const GURL& in_src_url, |
| 136 const GURL& in_page_url, | 136 const GURL& in_page_url, |
| 137 const GURL& in_keyword_url, |
| 137 const GURL& in_frame_url) | 138 const GURL& in_frame_url) |
| 138 : screen_x(in_screen_x), | 139 : screen_x(in_screen_x), |
| 139 screen_y(in_screen_y), | 140 screen_y(in_screen_y), |
| 140 link_url(in_link_url), | 141 link_url(in_link_url), |
| 141 unfiltered_link_url(in_unfiltered_link_url), | 142 unfiltered_link_url(in_unfiltered_link_url), |
| 142 src_url(in_src_url), | 143 src_url(in_src_url), |
| 143 page_url(in_page_url), | 144 page_url(in_page_url), |
| 145 keyword_url(in_keyword_url), |
| 144 frame_url(in_frame_url) { | 146 frame_url(in_frame_url) { |
| 145 } | 147 } |
| 146 | 148 |
| 147 MiniContextMenuParams::~MiniContextMenuParams() {} | 149 MiniContextMenuParams::~MiniContextMenuParams() {} |
| 148 | 150 |
| 149 AttachExternalTabParams::AttachExternalTabParams() | 151 AttachExternalTabParams::AttachExternalTabParams() |
| 150 : cookie(0), | 152 : cookie(0), |
| 151 disposition(0), | 153 disposition(0), |
| 152 user_gesture(false) { | 154 user_gesture(false) { |
| 153 } | 155 } |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 | 596 |
| 595 // static | 597 // static |
| 596 void ParamTraits<MiniContextMenuParams>::Write(Message* m, | 598 void ParamTraits<MiniContextMenuParams>::Write(Message* m, |
| 597 const param_type& p) { | 599 const param_type& p) { |
| 598 WriteParam(m, p.screen_x); | 600 WriteParam(m, p.screen_x); |
| 599 WriteParam(m, p.screen_y); | 601 WriteParam(m, p.screen_y); |
| 600 WriteParam(m, p.link_url); | 602 WriteParam(m, p.link_url); |
| 601 WriteParam(m, p.unfiltered_link_url); | 603 WriteParam(m, p.unfiltered_link_url); |
| 602 WriteParam(m, p.src_url); | 604 WriteParam(m, p.src_url); |
| 603 WriteParam(m, p.page_url); | 605 WriteParam(m, p.page_url); |
| 606 WriteParam(m, p.keyword_url); |
| 604 WriteParam(m, p.frame_url); | 607 WriteParam(m, p.frame_url); |
| 605 } | 608 } |
| 606 | 609 |
| 607 // static | 610 // static |
| 608 bool ParamTraits<MiniContextMenuParams>::Read(const Message* m, | 611 bool ParamTraits<MiniContextMenuParams>::Read(const Message* m, |
| 609 void** iter, | 612 void** iter, |
| 610 param_type* p) { | 613 param_type* p) { |
| 611 return ReadParam(m, iter, &p->screen_x) && | 614 return ReadParam(m, iter, &p->screen_x) && |
| 612 ReadParam(m, iter, &p->screen_y) && | 615 ReadParam(m, iter, &p->screen_y) && |
| 613 ReadParam(m, iter, &p->link_url) && | 616 ReadParam(m, iter, &p->link_url) && |
| 614 ReadParam(m, iter, &p->unfiltered_link_url) && | 617 ReadParam(m, iter, &p->unfiltered_link_url) && |
| 615 ReadParam(m, iter, &p->src_url) && | 618 ReadParam(m, iter, &p->src_url) && |
| 616 ReadParam(m, iter, &p->page_url) && | 619 ReadParam(m, iter, &p->page_url) && |
| 620 ReadParam(m, iter, &p->keyword_url) && |
| 617 ReadParam(m, iter, &p->frame_url); | 621 ReadParam(m, iter, &p->frame_url); |
| 618 } | 622 } |
| 619 | 623 |
| 620 // static | 624 // static |
| 621 void ParamTraits<MiniContextMenuParams>::Log(const param_type& p, | 625 void ParamTraits<MiniContextMenuParams>::Log(const param_type& p, |
| 622 std::string* l) { | 626 std::string* l) { |
| 623 l->append("("); | 627 l->append("("); |
| 624 LogParam(p.screen_x, l); | 628 LogParam(p.screen_x, l); |
| 625 l->append(", "); | 629 l->append(", "); |
| 626 LogParam(p.screen_y, l); | 630 LogParam(p.screen_y, l); |
| 627 l->append(", "); | 631 l->append(", "); |
| 628 LogParam(p.link_url, l); | 632 LogParam(p.link_url, l); |
| 629 l->append(", "); | 633 l->append(", "); |
| 630 LogParam(p.unfiltered_link_url, l); | 634 LogParam(p.unfiltered_link_url, l); |
| 631 l->append(", "); | 635 l->append(", "); |
| 632 LogParam(p.src_url, l); | 636 LogParam(p.src_url, l); |
| 633 l->append(", "); | 637 l->append(", "); |
| 634 LogParam(p.page_url, l); | 638 LogParam(p.page_url, l); |
| 635 l->append(", "); | 639 l->append(", "); |
| 640 LogParam(p.keyword_url, l); |
| 641 l->append(", "); |
| 636 LogParam(p.frame_url, l); | 642 LogParam(p.frame_url, l); |
| 637 l->append(")"); | 643 l->append(")"); |
| 638 } | 644 } |
| 639 | 645 |
| 640 // static | 646 // static |
| 641 void ParamTraits<AttachExternalTabParams>::Write(Message* m, | 647 void ParamTraits<AttachExternalTabParams>::Write(Message* m, |
| 642 const param_type& p) { | 648 const param_type& p) { |
| 643 WriteParam(m, p.cookie); | 649 WriteParam(m, p.cookie); |
| 644 WriteParam(m, p.url); | 650 WriteParam(m, p.url); |
| 645 WriteParam(m, p.dimensions); | 651 WriteParam(m, p.dimensions); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 672 l->append(", "); | 678 l->append(", "); |
| 673 LogParam(p.disposition, l); | 679 LogParam(p.disposition, l); |
| 674 l->append(", "); | 680 l->append(", "); |
| 675 LogParam(p.user_gesture, l); | 681 LogParam(p.user_gesture, l); |
| 676 l->append(","); | 682 l->append(","); |
| 677 LogParam(p.profile_name, l); | 683 LogParam(p.profile_name, l); |
| 678 l->append(")"); | 684 l->append(")"); |
| 679 } | 685 } |
| 680 | 686 |
| 681 } // namespace IPC | 687 } // namespace IPC |
| OLD | NEW |