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

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

Issue 10384023: Determine the element location and click synchronously on the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 7 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/automation_messages.h ('k') | chrome/common/automation_messages_internal.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/public/common/webkit_param_traits.h" 6 #include "content/public/common/webkit_param_traits.h"
7 #include "ui/base/models/menu_model.h" 7 #include "ui/base/models/menu_model.h"
8 8
9 // Get basic type definitions. 9 // Get basic type definitions.
10 #define IPC_MESSAGE_IMPL 10 #define IPC_MESSAGE_IMPL
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 LogParam(item.enabled, l); 128 LogParam(item.enabled, l);
129 if (item.type == ui::MenuModel::TYPE_SUBMENU) { 129 if (item.type == ui::MenuModel::TYPE_SUBMENU) {
130 l->append(", "); 130 l->append(", ");
131 Log(*item.submenu, l); 131 Log(*item.submenu, l);
132 } 132 }
133 l->append(")"); 133 l->append(")");
134 } 134 }
135 l->append(")"); 135 l->append(")");
136 } 136 }
137 137
138 // static
139 void ParamTraits<AutomationMouseEvent>::Write(Message* m,
140 const param_type& p) {
141 WriteParam(m, std::string(reinterpret_cast<const char*>(&p.mouse_event),
142 sizeof(p.mouse_event)));
143 WriteParam(m, p.location_script_chain);
144 }
145
146 // static
147 bool ParamTraits<AutomationMouseEvent>::Read(const Message* m,
148 PickleIterator* iter,
149 param_type* p) {
150 std::string mouse_event;
151 if (!ReadParam(m, iter, &mouse_event))
152 return false;
153 memcpy(&p->mouse_event, mouse_event.c_str(), mouse_event.length());
154 if (!ReadParam(m, iter, &p->location_script_chain))
155 return false;
156 return true;
157 }
158
159 // static
160 void ParamTraits<AutomationMouseEvent>::Log(const param_type& p,
161 std::string* l) {
162 l->append("(");
163 LogParam(std::string(reinterpret_cast<const char*>(&p.mouse_event),
164 sizeof(p.mouse_event)),
165 l);
166 l->append(", ");
167 LogParam(p.location_script_chain, l);
168 l->append(")");
169 }
170
138 } // namespace IPC 171 } // namespace IPC
OLDNEW
« no previous file with comments | « chrome/common/automation_messages.h ('k') | chrome/common/automation_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698