| OLD | NEW |
| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 break; | 156 break; |
| 157 default: | 157 default: |
| 158 control = L"UNKNOWN"; | 158 control = L"UNKNOWN"; |
| 159 break; | 159 break; |
| 160 } | 160 } |
| 161 | 161 |
| 162 LogParam(control, l); | 162 LogParam(control, l); |
| 163 } | 163 } |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 #if defined(OS_WIN) | |
| 167 struct Reposition_Params { | |
| 168 HWND window; | |
| 169 HWND window_insert_after; | |
| 170 int left; | |
| 171 int top; | |
| 172 int width; | |
| 173 int height; | |
| 174 int flags; | |
| 175 bool set_parent; | |
| 176 HWND parent_window; | |
| 177 }; | |
| 178 | |
| 179 // Traits for SetWindowPos_Params structure to pack/unpack. | |
| 180 template <> | |
| 181 struct ParamTraits<Reposition_Params> { | |
| 182 typedef Reposition_Params param_type; | |
| 183 static void Write(Message* m, const param_type& p) { | |
| 184 WriteParam(m, p.window); | |
| 185 WriteParam(m, p.window_insert_after); | |
| 186 WriteParam(m, p.left); | |
| 187 WriteParam(m, p.top); | |
| 188 WriteParam(m, p.width); | |
| 189 WriteParam(m, p.height); | |
| 190 WriteParam(m, p.flags); | |
| 191 WriteParam(m, p.set_parent); | |
| 192 WriteParam(m, p.parent_window); | |
| 193 } | |
| 194 static bool Read(const Message* m, void** iter, param_type* p) { | |
| 195 return ReadParam(m, iter, &p->window) && | |
| 196 ReadParam(m, iter, &p->window_insert_after) && | |
| 197 ReadParam(m, iter, &p->left) && | |
| 198 ReadParam(m, iter, &p->top) && | |
| 199 ReadParam(m, iter, &p->width) && | |
| 200 ReadParam(m, iter, &p->height) && | |
| 201 ReadParam(m, iter, &p->flags) && | |
| 202 ReadParam(m, iter, &p->set_parent) && | |
| 203 ReadParam(m, iter, &p->parent_window); | |
| 204 } | |
| 205 static void Log(const param_type& p, std::wstring* l) { | |
| 206 l->append(L"("); | |
| 207 LogParam(p.window, l); | |
| 208 l->append(L", "); | |
| 209 LogParam(p.window_insert_after, l); | |
| 210 l->append(L", "); | |
| 211 LogParam(p.left, l); | |
| 212 l->append(L", "); | |
| 213 LogParam(p.top, l); | |
| 214 l->append(L", "); | |
| 215 LogParam(p.width, l); | |
| 216 l->append(L", "); | |
| 217 LogParam(p.height, l); | |
| 218 l->append(L", "); | |
| 219 LogParam(p.flags, l); | |
| 220 l->append(L", "); | |
| 221 LogParam(p.set_parent, l); | |
| 222 l->append(L", "); | |
| 223 LogParam(p.parent_window, l); | |
| 224 l->append(L")"); | |
| 225 } | |
| 226 }; | |
| 227 #endif // defined(OS_WIN) | |
| 228 | |
| 229 struct AutomationURLRequest { | 166 struct AutomationURLRequest { |
| 230 std::string url; | 167 std::string url; |
| 231 std::string method; | 168 std::string method; |
| 232 std::string referrer; | 169 std::string referrer; |
| 233 std::string extra_request_headers; | 170 std::string extra_request_headers; |
| 234 scoped_refptr<net::UploadData> upload_data; | 171 scoped_refptr<net::UploadData> upload_data; |
| 235 }; | 172 }; |
| 236 | 173 |
| 237 // Traits for AutomationURLRequest structure to pack/unpack. | 174 // Traits for AutomationURLRequest structure to pack/unpack. |
| 238 template <> | 175 template <> |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 } | 357 } |
| 421 }; | 358 }; |
| 422 | 359 |
| 423 } // namespace IPC | 360 } // namespace IPC |
| 424 | 361 |
| 425 #define MESSAGES_INTERNAL_FILE \ | 362 #define MESSAGES_INTERNAL_FILE \ |
| 426 "chrome/test/automation/automation_messages_internal.h" | 363 "chrome/test/automation/automation_messages_internal.h" |
| 427 #include "ipc/ipc_message_macros.h" | 364 #include "ipc/ipc_message_macros.h" |
| 428 | 365 |
| 429 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_MESSAGES_H__ | 366 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_MESSAGES_H__ |
| OLD | NEW |