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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/automation_messages.h ('k') | chrome/common/automation_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/automation_messages.cc
diff --git a/chrome/common/automation_messages.cc b/chrome/common/automation_messages.cc
index ef3dd478817bac4e21ea7660c113ad6a59c9b971..588fc4ab3513b6a6200551df4ed9f4e6d8f9545c 100644
--- a/chrome/common/automation_messages.cc
+++ b/chrome/common/automation_messages.cc
@@ -135,4 +135,37 @@ void ParamTraits<ContextMenuModel>::Log(const param_type& p,
l->append(")");
}
+// static
+void ParamTraits<AutomationMouseEvent>::Write(Message* m,
+ const param_type& p) {
+ WriteParam(m, std::string(reinterpret_cast<const char*>(&p.mouse_event),
+ sizeof(p.mouse_event)));
+ WriteParam(m, p.location_script_chain);
+}
+
+// static
+bool ParamTraits<AutomationMouseEvent>::Read(const Message* m,
+ PickleIterator* iter,
+ param_type* p) {
+ std::string mouse_event;
+ if (!ReadParam(m, iter, &mouse_event))
+ return false;
+ memcpy(&p->mouse_event, mouse_event.c_str(), mouse_event.length());
+ if (!ReadParam(m, iter, &p->location_script_chain))
+ return false;
+ return true;
+}
+
+// static
+void ParamTraits<AutomationMouseEvent>::Log(const param_type& p,
+ std::string* l) {
+ l->append("(");
+ LogParam(std::string(reinterpret_cast<const char*>(&p.mouse_event),
+ sizeof(p.mouse_event)),
+ l);
+ l->append(", ");
+ LogParam(p.location_script_chain, l);
+ l->append(")");
+}
+
} // namespace IPC
« 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