OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #define IPC_MESSAGE_IMPL | 5 #define IPC_MESSAGE_IMPL |
6 #include "chrome/common/automation_messages.h" | 6 #include "chrome/common/automation_messages.h" |
7 | 7 |
| 8 |
| 9 AutomationURLRequest::AutomationURLRequest() |
| 10 : resource_type(0), |
| 11 load_flags(0) { |
| 12 } |
| 13 |
| 14 AutomationURLRequest::AutomationURLRequest( |
| 15 const std::string& in_url, |
| 16 const std::string& in_method, |
| 17 const std::string& in_referrer, |
| 18 const std::string& in_extra_request_headers, |
| 19 scoped_refptr<net::UploadData> in_upload_data, |
| 20 int in_resource_type, |
| 21 int in_load_flags) |
| 22 : url(in_url), |
| 23 method(in_method), |
| 24 referrer(in_referrer), |
| 25 extra_request_headers(in_extra_request_headers), |
| 26 upload_data(in_upload_data), |
| 27 resource_type(in_resource_type), |
| 28 load_flags(in_load_flags) { |
| 29 } |
| 30 |
| 31 AutomationURLRequest::~AutomationURLRequest() {} |
| 32 |
| 33 AutomationURLResponse::AutomationURLResponse() |
| 34 : content_length(0), |
| 35 redirect_status(0) { |
| 36 } |
| 37 |
| 38 AutomationURLResponse::AutomationURLResponse(const std::string& in_mime_type, |
| 39 const std::string& in_headers, |
| 40 int64 in_content_length, |
| 41 const base::Time& in_last_modified, |
| 42 const std::string& in_redirect_url, |
| 43 int in_redirect_status) |
| 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 } |
| 51 |
| 52 |
| 53 AutomationURLResponse::~AutomationURLResponse() {} |
| 54 |
| 55 ExternalTabSettings::ExternalTabSettings() |
| 56 : parent(NULL), |
| 57 dimensions(), |
| 58 style(0), |
| 59 is_off_the_record(false), |
| 60 load_requests_via_automation(false), |
| 61 handle_top_level_requests(false), |
| 62 initial_url(), |
| 63 referrer(), |
| 64 infobars_enabled(false), |
| 65 route_all_top_level_navigations(false) { |
| 66 } |
| 67 |
| 68 ExternalTabSettings::ExternalTabSettings( |
| 69 gfx::NativeWindow in_parent, |
| 70 const gfx::Rect& in_dimensions, |
| 71 unsigned int in_style, |
| 72 bool in_is_off_the_record, |
| 73 bool in_load_requests_via_automation, |
| 74 bool in_handle_top_level_requests, |
| 75 const GURL& in_initial_url, |
| 76 const GURL& in_referrer, |
| 77 bool in_infobars_enabled, |
| 78 bool in_route_all_top_level_navigations) |
| 79 : parent(in_parent), |
| 80 dimensions(in_dimensions), |
| 81 style(in_style), |
| 82 is_off_the_record(in_is_off_the_record), |
| 83 load_requests_via_automation(in_load_requests_via_automation), |
| 84 handle_top_level_requests(in_handle_top_level_requests), |
| 85 initial_url(in_initial_url), |
| 86 referrer(in_referrer), |
| 87 infobars_enabled(in_infobars_enabled), |
| 88 route_all_top_level_navigations(in_route_all_top_level_navigations) { |
| 89 } |
| 90 |
| 91 ExternalTabSettings::~ExternalTabSettings() {} |
| 92 |
| 93 NavigationInfo::NavigationInfo() |
| 94 : navigation_type(0), |
| 95 relative_offset(0), |
| 96 navigation_index(0), |
| 97 displayed_insecure_content(0), |
| 98 ran_insecure_content(0) { |
| 99 } |
| 100 |
| 101 NavigationInfo::NavigationInfo(int in_navigation_type, |
| 102 int in_relative_offset, |
| 103 int in_navigation_index, |
| 104 const std::wstring& in_title, |
| 105 const GURL& in_url, |
| 106 const GURL& in_referrer, |
| 107 SecurityStyle in_security_style, |
| 108 bool in_displayed_insecure_content, |
| 109 bool in_ran_insecure_content) |
| 110 : navigation_type(in_navigation_type), |
| 111 relative_offset(in_relative_offset), |
| 112 navigation_index(in_navigation_index), |
| 113 title(in_title), |
| 114 url(in_url), |
| 115 referrer(in_referrer), |
| 116 security_style(in_security_style), |
| 117 displayed_insecure_content(in_displayed_insecure_content), |
| 118 ran_insecure_content(in_ran_insecure_content) { |
| 119 } |
| 120 |
| 121 NavigationInfo::~NavigationInfo() {} |
| 122 |
| 123 MiniContextMenuParams::MiniContextMenuParams() |
| 124 : screen_x(0), |
| 125 screen_y(0) { |
| 126 } |
| 127 |
| 128 MiniContextMenuParams::MiniContextMenuParams(int in_screen_x, |
| 129 int in_screen_y, |
| 130 const GURL& in_link_url, |
| 131 const GURL& in_unfiltered_link_url, |
| 132 const GURL& in_src_url, |
| 133 const GURL& in_page_url, |
| 134 const GURL& in_frame_url) |
| 135 : screen_x(in_screen_x), |
| 136 screen_y(in_screen_y), |
| 137 link_url(in_link_url), |
| 138 unfiltered_link_url(in_unfiltered_link_url), |
| 139 src_url(in_src_url), |
| 140 page_url(in_page_url), |
| 141 frame_url(in_frame_url) { |
| 142 } |
| 143 |
| 144 MiniContextMenuParams::~MiniContextMenuParams() {} |
| 145 |
| 146 AttachExternalTabParams::AttachExternalTabParams() |
| 147 : cookie(0), |
| 148 disposition(0), |
| 149 user_gesture(false) { |
| 150 } |
| 151 |
| 152 AttachExternalTabParams::AttachExternalTabParams( |
| 153 uint64 in_cookie, |
| 154 const GURL& in_url, |
| 155 const gfx::Rect& in_dimensions, |
| 156 int in_disposition, |
| 157 bool in_user_gesture, |
| 158 const std::string& in_profile_name) |
| 159 : cookie(in_cookie), |
| 160 url(in_url), |
| 161 dimensions(in_dimensions), |
| 162 disposition(in_disposition), |
| 163 user_gesture(in_user_gesture), |
| 164 profile_name(in_profile_name) { |
| 165 } |
| 166 |
| 167 AttachExternalTabParams::~AttachExternalTabParams() {} |
| 168 |
8 namespace IPC { | 169 namespace IPC { |
9 | 170 |
10 // static | 171 // static |
11 void ParamTraits<AutomationMsg_Find_Params>::Write(Message* m, | 172 void ParamTraits<AutomationMsg_Find_Params>::Write(Message* m, |
12 const param_type& p) { | 173 const param_type& p) { |
13 WriteParam(m, p.unused); | 174 WriteParam(m, p.unused); |
14 WriteParam(m, p.search_string); | 175 WriteParam(m, p.search_string); |
15 WriteParam(m, p.forward); | 176 WriteParam(m, p.forward); |
16 WriteParam(m, p.match_case); | 177 WriteParam(m, p.match_case); |
17 WriteParam(m, p.find_next); | 178 WriteParam(m, p.find_next); |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 control = "INTERSTITIAL_PAGE"; | 385 control = "INTERSTITIAL_PAGE"; |
225 break; | 386 break; |
226 default: | 387 default: |
227 control = "UNKNOWN"; | 388 control = "UNKNOWN"; |
228 break; | 389 break; |
229 } | 390 } |
230 | 391 |
231 LogParam(control, l); | 392 LogParam(control, l); |
232 } | 393 } |
233 | 394 |
234 AutomationURLRequest::AutomationURLRequest() | |
235 : resource_type(0), | |
236 load_flags(0) { | |
237 } | |
238 | |
239 AutomationURLRequest::AutomationURLRequest( | |
240 const std::string& in_url, | |
241 const std::string& in_method, | |
242 const std::string& in_referrer, | |
243 const std::string& in_extra_request_headers, | |
244 scoped_refptr<net::UploadData> in_upload_data, | |
245 int in_resource_type, | |
246 int in_load_flags) | |
247 : url(in_url), | |
248 method(in_method), | |
249 referrer(in_referrer), | |
250 extra_request_headers(in_extra_request_headers), | |
251 upload_data(in_upload_data), | |
252 resource_type(in_resource_type), | |
253 load_flags(in_load_flags) { | |
254 } | |
255 | |
256 AutomationURLRequest::~AutomationURLRequest() {} | |
257 | |
258 // static | 395 // static |
259 void ParamTraits<AutomationURLRequest>::Write(Message* m, const param_type& p) { | 396 void ParamTraits<AutomationURLRequest>::Write(Message* m, const param_type& p) { |
260 WriteParam(m, p.url); | 397 WriteParam(m, p.url); |
261 WriteParam(m, p.method); | 398 WriteParam(m, p.method); |
262 WriteParam(m, p.referrer); | 399 WriteParam(m, p.referrer); |
263 WriteParam(m, p.extra_request_headers); | 400 WriteParam(m, p.extra_request_headers); |
264 WriteParam(m, p.upload_data); | 401 WriteParam(m, p.upload_data); |
265 WriteParam(m, p.resource_type); | 402 WriteParam(m, p.resource_type); |
266 WriteParam(m, p.load_flags); | 403 WriteParam(m, p.load_flags); |
267 } | 404 } |
(...skipping 24 matching lines...) Expand all Loading... |
292 LogParam(p.extra_request_headers, l); | 429 LogParam(p.extra_request_headers, l); |
293 l->append(", "); | 430 l->append(", "); |
294 LogParam(p.upload_data, l); | 431 LogParam(p.upload_data, l); |
295 l->append(", "); | 432 l->append(", "); |
296 LogParam(p.resource_type, l); | 433 LogParam(p.resource_type, l); |
297 l->append(", "); | 434 l->append(", "); |
298 LogParam(p.load_flags, l); | 435 LogParam(p.load_flags, l); |
299 l->append(")"); | 436 l->append(")"); |
300 } | 437 } |
301 | 438 |
302 AutomationURLResponse::AutomationURLResponse() | |
303 : content_length(0), | |
304 redirect_status(0) { | |
305 } | |
306 | |
307 AutomationURLResponse::AutomationURLResponse(const std::string& in_mime_type, | |
308 const std::string& in_headers, | |
309 int64 in_content_length, | |
310 const base::Time& in_last_modified, | |
311 const std::string& in_redirect_url, | |
312 int in_redirect_status) | |
313 : mime_type(in_mime_type), | |
314 headers(in_headers), | |
315 content_length(in_content_length), | |
316 last_modified(in_last_modified), | |
317 redirect_url(in_redirect_url), | |
318 redirect_status(in_redirect_status) { | |
319 } | |
320 | |
321 | |
322 AutomationURLResponse::~AutomationURLResponse() {} | |
323 | |
324 // static | 439 // static |
325 void ParamTraits<AutomationURLResponse>::Write(Message* m, | 440 void ParamTraits<AutomationURLResponse>::Write(Message* m, |
326 const param_type& p) { | 441 const param_type& p) { |
327 WriteParam(m, p.mime_type); | 442 WriteParam(m, p.mime_type); |
328 WriteParam(m, p.headers); | 443 WriteParam(m, p.headers); |
329 WriteParam(m, p.content_length); | 444 WriteParam(m, p.content_length); |
330 WriteParam(m, p.last_modified); | 445 WriteParam(m, p.last_modified); |
331 WriteParam(m, p.redirect_url); | 446 WriteParam(m, p.redirect_url); |
332 WriteParam(m, p.redirect_status); | 447 WriteParam(m, p.redirect_status); |
333 } | 448 } |
(...skipping 21 matching lines...) Expand all Loading... |
355 LogParam(p.content_length, l); | 470 LogParam(p.content_length, l); |
356 l->append(", "); | 471 l->append(", "); |
357 LogParam(p.last_modified, l); | 472 LogParam(p.last_modified, l); |
358 l->append(", "); | 473 l->append(", "); |
359 LogParam(p.redirect_url, l); | 474 LogParam(p.redirect_url, l); |
360 l->append(", "); | 475 l->append(", "); |
361 LogParam(p.redirect_status, l); | 476 LogParam(p.redirect_status, l); |
362 l->append(")"); | 477 l->append(")"); |
363 } | 478 } |
364 | 479 |
365 ExternalTabSettings::ExternalTabSettings() | |
366 : parent(NULL), | |
367 dimensions(), | |
368 style(0), | |
369 is_off_the_record(false), | |
370 load_requests_via_automation(false), | |
371 handle_top_level_requests(false), | |
372 initial_url(), | |
373 referrer(), | |
374 infobars_enabled(false), | |
375 route_all_top_level_navigations(false) { | |
376 } | |
377 | |
378 ExternalTabSettings::ExternalTabSettings( | |
379 gfx::NativeWindow in_parent, | |
380 const gfx::Rect& in_dimensions, | |
381 unsigned int in_style, | |
382 bool in_is_off_the_record, | |
383 bool in_load_requests_via_automation, | |
384 bool in_handle_top_level_requests, | |
385 const GURL& in_initial_url, | |
386 const GURL& in_referrer, | |
387 bool in_infobars_enabled, | |
388 bool in_route_all_top_level_navigations) | |
389 : parent(in_parent), | |
390 dimensions(in_dimensions), | |
391 style(in_style), | |
392 is_off_the_record(in_is_off_the_record), | |
393 load_requests_via_automation(in_load_requests_via_automation), | |
394 handle_top_level_requests(in_handle_top_level_requests), | |
395 initial_url(in_initial_url), | |
396 referrer(in_referrer), | |
397 infobars_enabled(in_infobars_enabled), | |
398 route_all_top_level_navigations(in_route_all_top_level_navigations) { | |
399 } | |
400 | |
401 ExternalTabSettings::~ExternalTabSettings() {} | |
402 | |
403 // static | 480 // static |
404 void ParamTraits<ExternalTabSettings>::Write(Message* m, | 481 void ParamTraits<ExternalTabSettings>::Write(Message* m, |
405 const param_type& p) { | 482 const param_type& p) { |
406 WriteParam(m, p.parent); | 483 WriteParam(m, p.parent); |
407 WriteParam(m, p.dimensions); | 484 WriteParam(m, p.dimensions); |
408 WriteParam(m, p.style); | 485 WriteParam(m, p.style); |
409 WriteParam(m, p.is_off_the_record); | 486 WriteParam(m, p.is_off_the_record); |
410 WriteParam(m, p.load_requests_via_automation); | 487 WriteParam(m, p.load_requests_via_automation); |
411 WriteParam(m, p.handle_top_level_requests); | 488 WriteParam(m, p.handle_top_level_requests); |
412 WriteParam(m, p.initial_url); | 489 WriteParam(m, p.initial_url); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 LogParam(p.initial_url, l); | 527 LogParam(p.initial_url, l); |
451 l->append(", "); | 528 l->append(", "); |
452 LogParam(p.referrer, l); | 529 LogParam(p.referrer, l); |
453 l->append(", "); | 530 l->append(", "); |
454 LogParam(p.infobars_enabled, l); | 531 LogParam(p.infobars_enabled, l); |
455 l->append(", "); | 532 l->append(", "); |
456 LogParam(p.route_all_top_level_navigations, l); | 533 LogParam(p.route_all_top_level_navigations, l); |
457 l->append(")"); | 534 l->append(")"); |
458 } | 535 } |
459 | 536 |
460 NavigationInfo::NavigationInfo() | |
461 : navigation_type(0), | |
462 relative_offset(0), | |
463 navigation_index(0), | |
464 displayed_insecure_content(0), | |
465 ran_insecure_content(0) { | |
466 } | |
467 | |
468 NavigationInfo::NavigationInfo(int in_navigation_type, | |
469 int in_relative_offset, | |
470 int in_navigation_index, | |
471 const std::wstring& in_title, | |
472 const GURL& in_url, | |
473 const GURL& in_referrer, | |
474 SecurityStyle in_security_style, | |
475 bool in_displayed_insecure_content, | |
476 bool in_ran_insecure_content) | |
477 : navigation_type(in_navigation_type), | |
478 relative_offset(in_relative_offset), | |
479 navigation_index(in_navigation_index), | |
480 title(in_title), | |
481 url(in_url), | |
482 referrer(in_referrer), | |
483 security_style(in_security_style), | |
484 displayed_insecure_content(in_displayed_insecure_content), | |
485 ran_insecure_content(in_ran_insecure_content) { | |
486 } | |
487 | |
488 NavigationInfo::~NavigationInfo() {} | |
489 | |
490 // static | 537 // static |
491 void ParamTraits<NavigationInfo>::Write(Message* m, const param_type& p) { | 538 void ParamTraits<NavigationInfo>::Write(Message* m, const param_type& p) { |
492 WriteParam(m, p.navigation_type); | 539 WriteParam(m, p.navigation_type); |
493 WriteParam(m, p.relative_offset); | 540 WriteParam(m, p.relative_offset); |
494 WriteParam(m, p.navigation_index); | 541 WriteParam(m, p.navigation_index); |
495 WriteParam(m, p.title); | 542 WriteParam(m, p.title); |
496 WriteParam(m, p.url); | 543 WriteParam(m, p.url); |
497 WriteParam(m, p.referrer); | 544 WriteParam(m, p.referrer); |
498 WriteParam(m, p.security_style); | 545 WriteParam(m, p.security_style); |
499 WriteParam(m, p.displayed_insecure_content); | 546 WriteParam(m, p.displayed_insecure_content); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 LogParam(p.referrer, l); | 578 LogParam(p.referrer, l); |
532 l->append(", "); | 579 l->append(", "); |
533 LogParam(p.security_style, l); | 580 LogParam(p.security_style, l); |
534 l->append(", "); | 581 l->append(", "); |
535 LogParam(p.displayed_insecure_content, l); | 582 LogParam(p.displayed_insecure_content, l); |
536 l->append(", "); | 583 l->append(", "); |
537 LogParam(p.ran_insecure_content, l); | 584 LogParam(p.ran_insecure_content, l); |
538 l->append(")"); | 585 l->append(")"); |
539 } | 586 } |
540 | 587 |
541 MiniContextMenuParams::MiniContextMenuParams() | |
542 : screen_x(0), | |
543 screen_y(0) { | |
544 } | |
545 | |
546 MiniContextMenuParams::MiniContextMenuParams(int in_screen_x, | |
547 int in_screen_y, | |
548 const GURL& in_link_url, | |
549 const GURL& in_unfiltered_link_url, | |
550 const GURL& in_src_url, | |
551 const GURL& in_page_url, | |
552 const GURL& in_frame_url) | |
553 : screen_x(in_screen_x), | |
554 screen_y(in_screen_y), | |
555 link_url(in_link_url), | |
556 unfiltered_link_url(in_unfiltered_link_url), | |
557 src_url(in_src_url), | |
558 page_url(in_page_url), | |
559 frame_url(in_frame_url) { | |
560 } | |
561 | |
562 MiniContextMenuParams::~MiniContextMenuParams() {} | |
563 | |
564 // static | 588 // static |
565 void ParamTraits<MiniContextMenuParams>::Write(Message* m, | 589 void ParamTraits<MiniContextMenuParams>::Write(Message* m, |
566 const param_type& p) { | 590 const param_type& p) { |
567 WriteParam(m, p.screen_x); | 591 WriteParam(m, p.screen_x); |
568 WriteParam(m, p.screen_y); | 592 WriteParam(m, p.screen_y); |
569 WriteParam(m, p.link_url); | 593 WriteParam(m, p.link_url); |
570 WriteParam(m, p.unfiltered_link_url); | 594 WriteParam(m, p.unfiltered_link_url); |
571 WriteParam(m, p.src_url); | 595 WriteParam(m, p.src_url); |
572 WriteParam(m, p.page_url); | 596 WriteParam(m, p.page_url); |
573 WriteParam(m, p.frame_url); | 597 WriteParam(m, p.frame_url); |
(...skipping 25 matching lines...) Expand all Loading... |
599 LogParam(p.unfiltered_link_url, l); | 623 LogParam(p.unfiltered_link_url, l); |
600 l->append(", "); | 624 l->append(", "); |
601 LogParam(p.src_url, l); | 625 LogParam(p.src_url, l); |
602 l->append(", "); | 626 l->append(", "); |
603 LogParam(p.page_url, l); | 627 LogParam(p.page_url, l); |
604 l->append(", "); | 628 l->append(", "); |
605 LogParam(p.frame_url, l); | 629 LogParam(p.frame_url, l); |
606 l->append(")"); | 630 l->append(")"); |
607 } | 631 } |
608 | 632 |
609 AttachExternalTabParams::AttachExternalTabParams() | |
610 : cookie(0), | |
611 disposition(0), | |
612 user_gesture(false) { | |
613 } | |
614 | |
615 AttachExternalTabParams::AttachExternalTabParams( | |
616 uint64 in_cookie, | |
617 const GURL& in_url, | |
618 const gfx::Rect& in_dimensions, | |
619 int in_disposition, | |
620 bool in_user_gesture, | |
621 const std::string& in_profile_name) | |
622 : cookie(in_cookie), | |
623 url(in_url), | |
624 dimensions(in_dimensions), | |
625 disposition(in_disposition), | |
626 user_gesture(in_user_gesture), | |
627 profile_name(in_profile_name) { | |
628 } | |
629 | |
630 AttachExternalTabParams::~AttachExternalTabParams() {} | |
631 | |
632 // static | 633 // static |
633 void ParamTraits<AttachExternalTabParams>::Write(Message* m, | 634 void ParamTraits<AttachExternalTabParams>::Write(Message* m, |
634 const param_type& p) { | 635 const param_type& p) { |
635 WriteParam(m, p.cookie); | 636 WriteParam(m, p.cookie); |
636 WriteParam(m, p.url); | 637 WriteParam(m, p.url); |
637 WriteParam(m, p.dimensions); | 638 WriteParam(m, p.dimensions); |
638 WriteParam(m, p.disposition); | 639 WriteParam(m, p.disposition); |
639 WriteParam(m, p.user_gesture); | 640 WriteParam(m, p.user_gesture); |
640 WriteParam(m, p.profile_name); | 641 WriteParam(m, p.profile_name); |
641 } | 642 } |
(...skipping 22 matching lines...) Expand all Loading... |
664 l->append(", "); | 665 l->append(", "); |
665 LogParam(p.disposition, l); | 666 LogParam(p.disposition, l); |
666 l->append(", "); | 667 l->append(", "); |
667 LogParam(p.user_gesture, l); | 668 LogParam(p.user_gesture, l); |
668 l->append(","); | 669 l->append(","); |
669 LogParam(p.profile_name, l); | 670 LogParam(p.profile_name, l); |
670 l->append(")"); | 671 l->append(")"); |
671 } | 672 } |
672 | 673 |
673 } // namespace IPC | 674 } // namespace IPC |
OLD | NEW |