OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // NOTE: New type and trait definitions that will only be used by tests (and not |
| 6 // by Chrome Frame) must be placed in automation_message_types.cc. |
| 7 |
| 8 #include "chrome/common/automation_message_types.h" |
| 9 |
| 10 AutomationURLRequest::AutomationURLRequest() |
| 11 : resource_type(0), |
| 12 load_flags(0) { |
| 13 } |
| 14 |
| 15 AutomationURLRequest::AutomationURLRequest( |
| 16 const std::string& in_url, |
| 17 const std::string& in_method, |
| 18 const std::string& in_referrer, |
| 19 const std::string& in_extra_request_headers, |
| 20 scoped_refptr<net::UploadData> in_upload_data, |
| 21 int in_resource_type, |
| 22 int in_load_flags) |
| 23 : url(in_url), |
| 24 method(in_method), |
| 25 referrer(in_referrer), |
| 26 extra_request_headers(in_extra_request_headers), |
| 27 upload_data(in_upload_data), |
| 28 resource_type(in_resource_type), |
| 29 load_flags(in_load_flags) { |
| 30 } |
| 31 |
| 32 AutomationURLRequest::~AutomationURLRequest() {} |
| 33 |
| 34 AutomationURLResponse::AutomationURLResponse() |
| 35 : content_length(0), |
| 36 redirect_status(0) { |
| 37 } |
| 38 |
| 39 AutomationURLResponse::AutomationURLResponse( |
| 40 const std::string& in_mime_type, const std::string& in_headers, |
| 41 int64 in_content_length, const base::Time& in_last_modified, |
| 42 const std::string& in_redirect_url, int in_redirect_status, |
| 43 const net::HostPortPair& host_socket_address) |
| 44 : mime_type(in_mime_type), |
| 45 headers(in_headers), |
| 46 content_length(in_content_length), |
| 47 last_modified(in_last_modified), |
| 48 redirect_url(in_redirect_url), |
| 49 redirect_status(in_redirect_status), |
| 50 socket_address(host_socket_address) { |
| 51 } |
| 52 |
| 53 |
| 54 AutomationURLResponse::~AutomationURLResponse() {} |
| 55 |
| 56 ExternalTabSettings::ExternalTabSettings() |
| 57 : parent(NULL), |
| 58 dimensions(), |
| 59 style(0), |
| 60 is_incognito(false), |
| 61 load_requests_via_automation(false), |
| 62 handle_top_level_requests(false), |
| 63 initial_url(), |
| 64 referrer(), |
| 65 infobars_enabled(false), |
| 66 route_all_top_level_navigations(false) { |
| 67 } |
| 68 |
| 69 ExternalTabSettings::ExternalTabSettings( |
| 70 gfx::NativeWindow in_parent, |
| 71 const gfx::Rect& in_dimensions, |
| 72 unsigned int in_style, |
| 73 bool in_is_incognito, |
| 74 bool in_load_requests_via_automation, |
| 75 bool in_handle_top_level_requests, |
| 76 const GURL& in_initial_url, |
| 77 const GURL& in_referrer, |
| 78 bool in_infobars_enabled, |
| 79 bool in_route_all_top_level_navigations) |
| 80 : parent(in_parent), |
| 81 dimensions(in_dimensions), |
| 82 style(in_style), |
| 83 is_incognito(in_is_incognito), |
| 84 load_requests_via_automation(in_load_requests_via_automation), |
| 85 handle_top_level_requests(in_handle_top_level_requests), |
| 86 initial_url(in_initial_url), |
| 87 referrer(in_referrer), |
| 88 infobars_enabled(in_infobars_enabled), |
| 89 route_all_top_level_navigations(in_route_all_top_level_navigations) { |
| 90 } |
| 91 |
| 92 ExternalTabSettings::~ExternalTabSettings() {} |
| 93 |
| 94 NavigationInfo::NavigationInfo() |
| 95 : navigation_type(0), |
| 96 relative_offset(0), |
| 97 navigation_index(0), |
| 98 security_style(SECURITY_STYLE_UNKNOWN), |
| 99 displayed_insecure_content(0), |
| 100 ran_insecure_content(0) { |
| 101 } |
| 102 |
| 103 NavigationInfo::NavigationInfo(int in_navigation_type, |
| 104 int in_relative_offset, |
| 105 int in_navigation_index, |
| 106 const std::wstring& in_title, |
| 107 const GURL& in_url, |
| 108 const GURL& in_referrer, |
| 109 SecurityStyle in_security_style, |
| 110 bool in_displayed_insecure_content, |
| 111 bool in_ran_insecure_content) |
| 112 : navigation_type(in_navigation_type), |
| 113 relative_offset(in_relative_offset), |
| 114 navigation_index(in_navigation_index), |
| 115 title(in_title), |
| 116 url(in_url), |
| 117 referrer(in_referrer), |
| 118 security_style(in_security_style), |
| 119 displayed_insecure_content(in_displayed_insecure_content), |
| 120 ran_insecure_content(in_ran_insecure_content) { |
| 121 } |
| 122 |
| 123 NavigationInfo::~NavigationInfo() {} |
| 124 |
| 125 MiniContextMenuParams::MiniContextMenuParams() |
| 126 : screen_x(0), |
| 127 screen_y(0) { |
| 128 } |
| 129 |
| 130 MiniContextMenuParams::MiniContextMenuParams(int in_screen_x, |
| 131 int in_screen_y, |
| 132 const GURL& in_link_url, |
| 133 const GURL& in_unfiltered_link_url, |
| 134 const GURL& in_src_url, |
| 135 const GURL& in_page_url, |
| 136 const GURL& in_frame_url) |
| 137 : screen_x(in_screen_x), |
| 138 screen_y(in_screen_y), |
| 139 link_url(in_link_url), |
| 140 unfiltered_link_url(in_unfiltered_link_url), |
| 141 src_url(in_src_url), |
| 142 page_url(in_page_url), |
| 143 frame_url(in_frame_url) { |
| 144 } |
| 145 |
| 146 MiniContextMenuParams::~MiniContextMenuParams() {} |
| 147 |
| 148 AttachExternalTabParams::AttachExternalTabParams() |
| 149 : cookie(0), |
| 150 disposition(0), |
| 151 user_gesture(false) { |
| 152 } |
| 153 |
| 154 AttachExternalTabParams::AttachExternalTabParams( |
| 155 uint64 in_cookie, |
| 156 const GURL& in_url, |
| 157 const gfx::Rect& in_dimensions, |
| 158 int in_disposition, |
| 159 bool in_user_gesture, |
| 160 const std::string& in_profile_name) |
| 161 : cookie(in_cookie), |
| 162 url(in_url), |
| 163 dimensions(in_dimensions), |
| 164 disposition(in_disposition), |
| 165 user_gesture(in_user_gesture), |
| 166 profile_name(in_profile_name) { |
| 167 } |
| 168 |
| 169 AttachExternalTabParams::~AttachExternalTabParams() {} |
| 170 |
| 171 namespace IPC { |
| 172 |
| 173 // static |
| 174 void ParamTraits<AutomationMsg_Find_Params>::Write(Message* m, |
| 175 const param_type& p) { |
| 176 WriteParam(m, p.unused); |
| 177 WriteParam(m, p.search_string); |
| 178 WriteParam(m, p.forward); |
| 179 WriteParam(m, p.match_case); |
| 180 WriteParam(m, p.find_next); |
| 181 } |
| 182 |
| 183 // static |
| 184 bool ParamTraits<AutomationMsg_Find_Params>::Read(const Message* m, |
| 185 void** iter, |
| 186 param_type* p) { |
| 187 return |
| 188 ReadParam(m, iter, &p->unused) && |
| 189 ReadParam(m, iter, &p->search_string) && |
| 190 ReadParam(m, iter, &p->forward) && |
| 191 ReadParam(m, iter, &p->match_case) && |
| 192 ReadParam(m, iter, &p->find_next); |
| 193 } |
| 194 |
| 195 // static |
| 196 void ParamTraits<AutomationMsg_Find_Params>::Log(const param_type& p, |
| 197 std::string* l) { |
| 198 l->append("<AutomationMsg_Find_Params>"); |
| 199 } |
| 200 |
| 201 // static |
| 202 void ParamTraits<AutomationMsg_NavigationResponseValues>::Write( |
| 203 Message* m, |
| 204 const param_type& p) { |
| 205 m->WriteInt(p); |
| 206 } |
| 207 |
| 208 // static |
| 209 bool ParamTraits<AutomationMsg_NavigationResponseValues>::Read(const Message* m, |
| 210 void** iter, |
| 211 param_type* p) { |
| 212 int type; |
| 213 if (!m->ReadInt(iter, &type)) |
| 214 return false; |
| 215 *p = static_cast<AutomationMsg_NavigationResponseValues>(type); |
| 216 return true; |
| 217 } |
| 218 |
| 219 // static |
| 220 void ParamTraits<AutomationMsg_NavigationResponseValues>::Log( |
| 221 const param_type& p, std::string* l) { |
| 222 std::string control; |
| 223 switch (p) { |
| 224 case AUTOMATION_MSG_NAVIGATION_ERROR: |
| 225 control = "AUTOMATION_MSG_NAVIGATION_ERROR"; |
| 226 break; |
| 227 case AUTOMATION_MSG_NAVIGATION_SUCCESS: |
| 228 control = "AUTOMATION_MSG_NAVIGATION_SUCCESS"; |
| 229 break; |
| 230 case AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED: |
| 231 control = "AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED"; |
| 232 break; |
| 233 default: |
| 234 control = "UNKNOWN"; |
| 235 break; |
| 236 } |
| 237 |
| 238 LogParam(control, l); |
| 239 } |
| 240 |
| 241 // static |
| 242 void ParamTraits<AutomationMsg_ExtensionProperty>::Write(Message* m, |
| 243 const param_type& p) { |
| 244 m->WriteInt(p); |
| 245 } |
| 246 |
| 247 // static |
| 248 bool ParamTraits<AutomationMsg_ExtensionProperty>::Read(const Message* m, |
| 249 void** iter, |
| 250 param_type* p) { |
| 251 int type; |
| 252 if (!m->ReadInt(iter, &type)) |
| 253 return false; |
| 254 *p = static_cast<AutomationMsg_ExtensionProperty>(type); |
| 255 return true; |
| 256 } |
| 257 |
| 258 // static |
| 259 void ParamTraits<AutomationMsg_ExtensionProperty>::Log(const param_type& p, |
| 260 std::string* l) { |
| 261 std::string control; |
| 262 switch (p) { |
| 263 case AUTOMATION_MSG_EXTENSION_ID: |
| 264 control = "AUTOMATION_MSG_EXTENSION_ID"; |
| 265 break; |
| 266 case AUTOMATION_MSG_EXTENSION_NAME: |
| 267 control = "AUTOMATION_MSG_EXTENSION_NAME"; |
| 268 break; |
| 269 case AUTOMATION_MSG_EXTENSION_VERSION: |
| 270 control = "AUTOMATION_MSG_EXTENSION_VERSION"; |
| 271 break; |
| 272 case AUTOMATION_MSG_EXTENSION_BROWSER_ACTION_INDEX: |
| 273 control = "AUTOMATION_MSG_EXTENSION_BROWSER_ACTION_INDEX"; |
| 274 break; |
| 275 default: |
| 276 control = "UNKNOWN"; |
| 277 break; |
| 278 } |
| 279 |
| 280 LogParam(control, l); |
| 281 } |
| 282 |
| 283 // static |
| 284 void ParamTraits<SecurityStyle>::Write(Message* m, const param_type& p) { |
| 285 m->WriteInt(p); |
| 286 } |
| 287 |
| 288 // static |
| 289 bool ParamTraits<SecurityStyle>::Read(const Message* m, |
| 290 void** iter, |
| 291 param_type* p) { |
| 292 int type; |
| 293 if (!m->ReadInt(iter, &type)) |
| 294 return false; |
| 295 *p = static_cast<SecurityStyle>(type); |
| 296 return true; |
| 297 } |
| 298 |
| 299 // static |
| 300 void ParamTraits<SecurityStyle>::Log(const param_type& p, std::string* l) { |
| 301 std::string control; |
| 302 switch (p) { |
| 303 case SECURITY_STYLE_UNKNOWN: |
| 304 control = "SECURITY_STYLE_UNKNOWN"; |
| 305 break; |
| 306 case SECURITY_STYLE_UNAUTHENTICATED: |
| 307 control = "SECURITY_STYLE_UNAUTHENTICATED"; |
| 308 break; |
| 309 case SECURITY_STYLE_AUTHENTICATION_BROKEN: |
| 310 control = "SECURITY_STYLE_AUTHENTICATION_BROKEN"; |
| 311 break; |
| 312 case SECURITY_STYLE_AUTHENTICATED: |
| 313 control = "SECURITY_STYLE_AUTHENTICATED"; |
| 314 break; |
| 315 default: |
| 316 control = "UNKNOWN"; |
| 317 break; |
| 318 } |
| 319 |
| 320 LogParam(control, l); |
| 321 } |
| 322 |
| 323 // static |
| 324 void ParamTraits<PageType>::Write(Message* m, const param_type& p) { |
| 325 m->WriteInt(p); |
| 326 } |
| 327 |
| 328 // static |
| 329 bool ParamTraits<PageType>::Read(const Message* m, void** iter, param_type* p) { |
| 330 int type; |
| 331 if (!m->ReadInt(iter, &type)) |
| 332 return false; |
| 333 *p = static_cast<PageType>(type); |
| 334 return true; |
| 335 } |
| 336 |
| 337 // static |
| 338 void ParamTraits<PageType>::Log(const param_type& p, std::string* l) { |
| 339 std::string control; |
| 340 switch (p) { |
| 341 case NORMAL_PAGE: |
| 342 control = "NORMAL_PAGE"; |
| 343 break; |
| 344 case ERROR_PAGE: |
| 345 control = "ERROR_PAGE"; |
| 346 break; |
| 347 case INTERSTITIAL_PAGE: |
| 348 control = "INTERSTITIAL_PAGE"; |
| 349 break; |
| 350 default: |
| 351 control = "UNKNOWN"; |
| 352 break; |
| 353 } |
| 354 |
| 355 LogParam(control, l); |
| 356 } |
| 357 |
| 358 // static |
| 359 void ParamTraits<AutomationURLRequest>::Write(Message* m, const param_type& p) { |
| 360 WriteParam(m, p.url); |
| 361 WriteParam(m, p.method); |
| 362 WriteParam(m, p.referrer); |
| 363 WriteParam(m, p.extra_request_headers); |
| 364 WriteParam(m, p.upload_data); |
| 365 WriteParam(m, p.resource_type); |
| 366 WriteParam(m, p.load_flags); |
| 367 } |
| 368 |
| 369 // static |
| 370 bool ParamTraits<AutomationURLRequest>::Read(const Message* m, |
| 371 void** iter, |
| 372 param_type* p) { |
| 373 return ReadParam(m, iter, &p->url) && |
| 374 ReadParam(m, iter, &p->method) && |
| 375 ReadParam(m, iter, &p->referrer) && |
| 376 ReadParam(m, iter, &p->extra_request_headers) && |
| 377 ReadParam(m, iter, &p->upload_data) && |
| 378 ReadParam(m, iter, &p->resource_type) && |
| 379 ReadParam(m, iter, &p->load_flags); |
| 380 } |
| 381 |
| 382 // static |
| 383 void ParamTraits<AutomationURLRequest>::Log(const param_type& p, |
| 384 std::string* l) { |
| 385 l->append("("); |
| 386 LogParam(p.url, l); |
| 387 l->append(", "); |
| 388 LogParam(p.method, l); |
| 389 l->append(", "); |
| 390 LogParam(p.referrer, l); |
| 391 l->append(", "); |
| 392 LogParam(p.extra_request_headers, l); |
| 393 l->append(", "); |
| 394 LogParam(p.upload_data, l); |
| 395 l->append(", "); |
| 396 LogParam(p.resource_type, l); |
| 397 l->append(", "); |
| 398 LogParam(p.load_flags, l); |
| 399 l->append(")"); |
| 400 } |
| 401 |
| 402 // static |
| 403 void ParamTraits<AutomationURLResponse>::Write(Message* m, |
| 404 const param_type& p) { |
| 405 WriteParam(m, p.mime_type); |
| 406 WriteParam(m, p.headers); |
| 407 WriteParam(m, p.content_length); |
| 408 WriteParam(m, p.last_modified); |
| 409 WriteParam(m, p.redirect_url); |
| 410 WriteParam(m, p.redirect_status); |
| 411 WriteParam(m, p.socket_address); |
| 412 } |
| 413 |
| 414 // static |
| 415 bool ParamTraits<AutomationURLResponse>::Read(const Message* m, |
| 416 void** iter, |
| 417 param_type* p) { |
| 418 return ReadParam(m, iter, &p->mime_type) && |
| 419 ReadParam(m, iter, &p->headers) && |
| 420 ReadParam(m, iter, &p->content_length) && |
| 421 ReadParam(m, iter, &p->last_modified) && |
| 422 ReadParam(m, iter, &p->redirect_url) && |
| 423 ReadParam(m, iter, &p->redirect_status) && |
| 424 ReadParam(m, iter, &p->socket_address); |
| 425 } |
| 426 |
| 427 // static |
| 428 void ParamTraits<AutomationURLResponse>::Log(const param_type& p, |
| 429 std::string* l) { |
| 430 l->append("("); |
| 431 LogParam(p.mime_type, l); |
| 432 l->append(", "); |
| 433 LogParam(p.headers, l); |
| 434 l->append(", "); |
| 435 LogParam(p.content_length, l); |
| 436 l->append(", "); |
| 437 LogParam(p.last_modified, l); |
| 438 l->append(", "); |
| 439 LogParam(p.redirect_url, l); |
| 440 l->append(", "); |
| 441 LogParam(p.redirect_status, l); |
| 442 l->append(", "); |
| 443 LogParam(p.socket_address, l); |
| 444 l->append(")"); |
| 445 } |
| 446 |
| 447 // static |
| 448 void ParamTraits<ExternalTabSettings>::Write(Message* m, |
| 449 const param_type& p) { |
| 450 WriteParam(m, p.parent); |
| 451 WriteParam(m, p.dimensions); |
| 452 WriteParam(m, p.style); |
| 453 WriteParam(m, p.is_incognito); |
| 454 WriteParam(m, p.load_requests_via_automation); |
| 455 WriteParam(m, p.handle_top_level_requests); |
| 456 WriteParam(m, p.initial_url); |
| 457 WriteParam(m, p.referrer); |
| 458 WriteParam(m, p.infobars_enabled); |
| 459 WriteParam(m, p.route_all_top_level_navigations); |
| 460 } |
| 461 |
| 462 // static |
| 463 bool ParamTraits<ExternalTabSettings>::Read(const Message* m, |
| 464 void** iter, |
| 465 param_type* p) { |
| 466 return ReadParam(m, iter, &p->parent) && |
| 467 ReadParam(m, iter, &p->dimensions) && |
| 468 ReadParam(m, iter, &p->style) && |
| 469 ReadParam(m, iter, &p->is_incognito) && |
| 470 ReadParam(m, iter, &p->load_requests_via_automation) && |
| 471 ReadParam(m, iter, &p->handle_top_level_requests) && |
| 472 ReadParam(m, iter, &p->initial_url) && |
| 473 ReadParam(m, iter, &p->referrer) && |
| 474 ReadParam(m, iter, &p->infobars_enabled) && |
| 475 ReadParam(m, iter, &p->route_all_top_level_navigations); |
| 476 } |
| 477 |
| 478 // static |
| 479 void ParamTraits<ExternalTabSettings>::Log(const param_type& p, |
| 480 std::string* l) { |
| 481 l->append("("); |
| 482 LogParam(p.parent, l); |
| 483 l->append(", "); |
| 484 LogParam(p.dimensions, l); |
| 485 l->append(", "); |
| 486 LogParam(p.style, l); |
| 487 l->append(", "); |
| 488 LogParam(p.is_incognito, l); |
| 489 l->append(", "); |
| 490 LogParam(p.load_requests_via_automation, l); |
| 491 l->append(", "); |
| 492 LogParam(p.handle_top_level_requests, l); |
| 493 l->append(", "); |
| 494 LogParam(p.initial_url, l); |
| 495 l->append(", "); |
| 496 LogParam(p.referrer, l); |
| 497 l->append(", "); |
| 498 LogParam(p.infobars_enabled, l); |
| 499 l->append(", "); |
| 500 LogParam(p.route_all_top_level_navigations, l); |
| 501 l->append(")"); |
| 502 } |
| 503 |
| 504 // static |
| 505 void ParamTraits<NavigationInfo>::Write(Message* m, const param_type& p) { |
| 506 WriteParam(m, p.navigation_type); |
| 507 WriteParam(m, p.relative_offset); |
| 508 WriteParam(m, p.navigation_index); |
| 509 WriteParam(m, p.title); |
| 510 WriteParam(m, p.url); |
| 511 WriteParam(m, p.referrer); |
| 512 WriteParam(m, p.security_style); |
| 513 WriteParam(m, p.displayed_insecure_content); |
| 514 WriteParam(m, p.ran_insecure_content); |
| 515 } |
| 516 |
| 517 // static |
| 518 bool ParamTraits<NavigationInfo>::Read(const Message* m, |
| 519 void** iter, |
| 520 param_type* p) { |
| 521 return ReadParam(m, iter, &p->navigation_type) && |
| 522 ReadParam(m, iter, &p->relative_offset) && |
| 523 ReadParam(m, iter, &p->navigation_index) && |
| 524 ReadParam(m, iter, &p->title) && |
| 525 ReadParam(m, iter, &p->url) && |
| 526 ReadParam(m, iter, &p->referrer) && |
| 527 ReadParam(m, iter, &p->security_style) && |
| 528 ReadParam(m, iter, &p->displayed_insecure_content) && |
| 529 ReadParam(m, iter, &p->ran_insecure_content); |
| 530 } |
| 531 |
| 532 // static |
| 533 void ParamTraits<NavigationInfo>::Log(const param_type& p, std::string* l) { |
| 534 l->append("("); |
| 535 LogParam(p.navigation_type, l); |
| 536 l->append(", "); |
| 537 LogParam(p.relative_offset, l); |
| 538 l->append(", "); |
| 539 LogParam(p.navigation_index, l); |
| 540 l->append(", "); |
| 541 LogParam(p.title, l); |
| 542 l->append(", "); |
| 543 LogParam(p.url, l); |
| 544 l->append(", "); |
| 545 LogParam(p.referrer, l); |
| 546 l->append(", "); |
| 547 LogParam(p.security_style, l); |
| 548 l->append(", "); |
| 549 LogParam(p.displayed_insecure_content, l); |
| 550 l->append(", "); |
| 551 LogParam(p.ran_insecure_content, l); |
| 552 l->append(")"); |
| 553 } |
| 554 |
| 555 // static |
| 556 void ParamTraits<MiniContextMenuParams>::Write(Message* m, |
| 557 const param_type& p) { |
| 558 WriteParam(m, p.screen_x); |
| 559 WriteParam(m, p.screen_y); |
| 560 WriteParam(m, p.link_url); |
| 561 WriteParam(m, p.unfiltered_link_url); |
| 562 WriteParam(m, p.src_url); |
| 563 WriteParam(m, p.page_url); |
| 564 WriteParam(m, p.frame_url); |
| 565 } |
| 566 |
| 567 // static |
| 568 bool ParamTraits<MiniContextMenuParams>::Read(const Message* m, |
| 569 void** iter, |
| 570 param_type* p) { |
| 571 return ReadParam(m, iter, &p->screen_x) && |
| 572 ReadParam(m, iter, &p->screen_y) && |
| 573 ReadParam(m, iter, &p->link_url) && |
| 574 ReadParam(m, iter, &p->unfiltered_link_url) && |
| 575 ReadParam(m, iter, &p->src_url) && |
| 576 ReadParam(m, iter, &p->page_url) && |
| 577 ReadParam(m, iter, &p->frame_url); |
| 578 } |
| 579 |
| 580 // static |
| 581 void ParamTraits<MiniContextMenuParams>::Log(const param_type& p, |
| 582 std::string* l) { |
| 583 l->append("("); |
| 584 LogParam(p.screen_x, l); |
| 585 l->append(", "); |
| 586 LogParam(p.screen_y, l); |
| 587 l->append(", "); |
| 588 LogParam(p.link_url, l); |
| 589 l->append(", "); |
| 590 LogParam(p.unfiltered_link_url, l); |
| 591 l->append(", "); |
| 592 LogParam(p.src_url, l); |
| 593 l->append(", "); |
| 594 LogParam(p.page_url, l); |
| 595 l->append(", "); |
| 596 LogParam(p.frame_url, l); |
| 597 l->append(")"); |
| 598 } |
| 599 |
| 600 // static |
| 601 void ParamTraits<AttachExternalTabParams>::Write(Message* m, |
| 602 const param_type& p) { |
| 603 WriteParam(m, p.cookie); |
| 604 WriteParam(m, p.url); |
| 605 WriteParam(m, p.dimensions); |
| 606 WriteParam(m, p.disposition); |
| 607 WriteParam(m, p.user_gesture); |
| 608 WriteParam(m, p.profile_name); |
| 609 } |
| 610 |
| 611 // static |
| 612 bool ParamTraits<AttachExternalTabParams>::Read(const Message* m, |
| 613 void** iter, |
| 614 param_type* p) { |
| 615 return ReadParam(m, iter, &p->cookie) && |
| 616 ReadParam(m, iter, &p->url) && |
| 617 ReadParam(m, iter, &p->dimensions) && |
| 618 ReadParam(m, iter, &p->disposition) && |
| 619 ReadParam(m, iter, &p->user_gesture) && |
| 620 ReadParam(m, iter, &p->profile_name); |
| 621 } |
| 622 |
| 623 // static |
| 624 void ParamTraits<AttachExternalTabParams>::Log(const param_type& p, |
| 625 std::string* l) { |
| 626 l->append("("); |
| 627 LogParam(p.cookie, l); |
| 628 l->append(", "); |
| 629 LogParam(p.url, l); |
| 630 l->append(", "); |
| 631 LogParam(p.dimensions, l); |
| 632 l->append(", "); |
| 633 LogParam(p.disposition, l); |
| 634 l->append(", "); |
| 635 LogParam(p.user_gesture, l); |
| 636 l->append(","); |
| 637 LogParam(p.profile_name, l); |
| 638 l->append(")"); |
| 639 } |
| 640 |
| 641 } // namespace IPC |
OLD | NEW |