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

Side by Side Diff: chrome/test/automation/automation_messages.h

Issue 62042: Added an automation IPC to set the parent of a window. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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/browser/automation/automation_provider.cc ('k') | chrome/test/automation/tab_proxy.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_TEST_AUTOMATION_AUTOMATION_MESSAGES_H__ 5 #ifndef CHROME_TEST_AUTOMATION_AUTOMATION_MESSAGES_H__
6 #define CHROME_TEST_AUTOMATION_AUTOMATION_MESSAGES_H__ 6 #define CHROME_TEST_AUTOMATION_AUTOMATION_MESSAGES_H__
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 #if defined(OS_WIN) 163 #if defined(OS_WIN)
164 struct Reposition_Params { 164 struct Reposition_Params {
165 HWND window; 165 HWND window;
166 HWND window_insert_after; 166 HWND window_insert_after;
167 int left; 167 int left;
168 int top; 168 int top;
169 int width; 169 int width;
170 int height; 170 int height;
171 int flags; 171 int flags;
172 bool set_parent;
173 HWND parent_window;
172 }; 174 };
173 175
174 // Traits for SetWindowPos_Params structure to pack/unpack. 176 // Traits for SetWindowPos_Params structure to pack/unpack.
175 template <> 177 template <>
176 struct ParamTraits<Reposition_Params> { 178 struct ParamTraits<Reposition_Params> {
177 typedef Reposition_Params param_type; 179 typedef Reposition_Params param_type;
178 static void Write(Message* m, const param_type& p) { 180 static void Write(Message* m, const param_type& p) {
179 WriteParam(m, p.window); 181 WriteParam(m, p.window);
180 WriteParam(m, p.window_insert_after); 182 WriteParam(m, p.window_insert_after);
181 WriteParam(m, p.left); 183 WriteParam(m, p.left);
182 WriteParam(m, p.top); 184 WriteParam(m, p.top);
183 WriteParam(m, p.width); 185 WriteParam(m, p.width);
184 WriteParam(m, p.height); 186 WriteParam(m, p.height);
185 WriteParam(m, p.flags); 187 WriteParam(m, p.flags);
188 WriteParam(m, p.set_parent);
189 WriteParam(m, p.parent_window);
186 } 190 }
187 static bool Read(const Message* m, void** iter, param_type* p) { 191 static bool Read(const Message* m, void** iter, param_type* p) {
188 return ReadParam(m, iter, &p->window) && 192 return ReadParam(m, iter, &p->window) &&
189 ReadParam(m, iter, &p->window_insert_after) && 193 ReadParam(m, iter, &p->window_insert_after) &&
190 ReadParam(m, iter, &p->left) && 194 ReadParam(m, iter, &p->left) &&
191 ReadParam(m, iter, &p->top) && 195 ReadParam(m, iter, &p->top) &&
192 ReadParam(m, iter, &p->width) && 196 ReadParam(m, iter, &p->width) &&
193 ReadParam(m, iter, &p->height) && 197 ReadParam(m, iter, &p->height) &&
194 ReadParam(m, iter, &p->flags); 198 ReadParam(m, iter, &p->flags) &&
199 ReadParam(m, iter, &p->set_parent) &&
200 ReadParam(m, iter, &p->parent_window);
195 } 201 }
196 static void Log(const param_type& p, std::wstring* l) { 202 static void Log(const param_type& p, std::wstring* l) {
197 l->append(L"("); 203 l->append(L"(");
198 LogParam(p.window, l); 204 LogParam(p.window, l);
199 l->append(L", "); 205 l->append(L", ");
200 LogParam(p.window_insert_after, l); 206 LogParam(p.window_insert_after, l);
201 l->append(L", "); 207 l->append(L", ");
202 LogParam(p.left, l); 208 LogParam(p.left, l);
203 l->append(L", "); 209 l->append(L", ");
204 LogParam(p.top, l); 210 LogParam(p.top, l);
205 l->append(L", "); 211 l->append(L", ");
206 LogParam(p.width, l); 212 LogParam(p.width, l);
207 l->append(L", "); 213 l->append(L", ");
208 LogParam(p.height, l); 214 LogParam(p.height, l);
209 l->append(L", "); 215 l->append(L", ");
210 LogParam(p.flags, l); 216 LogParam(p.flags, l);
217 l->append(L", ");
218 LogParam(p.set_parent, l);
219 l->append(L", ");
220 LogParam(p.parent_window, l);
211 l->append(L")"); 221 l->append(L")");
212 } 222 }
213 }; 223 };
214 #endif // defined(OS_WIN) 224 #endif // defined(OS_WIN)
215 225
216 } // namespace IPC 226 } // namespace IPC
217 227
218 #define MESSAGES_INTERNAL_FILE \ 228 #define MESSAGES_INTERNAL_FILE \
219 "chrome/test/automation/automation_messages_internal.h" 229 "chrome/test/automation/automation_messages_internal.h"
220 #include "chrome/common/ipc_message_macros.h" 230 #include "chrome/common/ipc_message_macros.h"
221 231
222 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_MESSAGES_H__ 232 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_MESSAGES_H__
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/test/automation/tab_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698