OLD | NEW |
1 // Copyright (c) 2010 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" |
11 #include "chrome/browser/tab_contents/navigation_entry.h" | 11 #include "chrome/browser/tab_contents/navigation_entry.h" |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 } | 445 } |
446 }; | 446 }; |
447 | 447 |
448 struct NavigationInfo { | 448 struct NavigationInfo { |
449 int navigation_type; | 449 int navigation_type; |
450 int relative_offset; | 450 int relative_offset; |
451 int navigation_index; | 451 int navigation_index; |
452 std::wstring title; | 452 std::wstring title; |
453 GURL url; | 453 GURL url; |
454 SecurityStyle security_style; | 454 SecurityStyle security_style; |
455 bool displayed_mixed_content; | 455 bool has_mixed_content; |
456 bool ran_mixed_content; | |
457 }; | 456 }; |
458 | 457 |
459 // Traits for NavigationInfo structure to pack/unpack. | 458 // Traits for NavigationInfo structure to pack/unpack. |
460 template <> | 459 template <> |
461 struct ParamTraits<NavigationInfo> { | 460 struct ParamTraits<NavigationInfo> { |
462 typedef NavigationInfo param_type; | 461 typedef NavigationInfo param_type; |
463 static void Write(Message* m, const param_type& p) { | 462 static void Write(Message* m, const param_type& p) { |
464 WriteParam(m, p.navigation_type); | 463 WriteParam(m, p.navigation_type); |
465 WriteParam(m, p.relative_offset); | 464 WriteParam(m, p.relative_offset); |
466 WriteParam(m, p.navigation_index); | 465 WriteParam(m, p.navigation_index); |
467 WriteParam(m, p.title); | 466 WriteParam(m, p.title); |
468 WriteParam(m, p.url); | 467 WriteParam(m, p.url); |
469 WriteParam(m, p.security_style); | 468 WriteParam(m, p.security_style); |
470 WriteParam(m, p.displayed_mixed_content); | 469 WriteParam(m, p.has_mixed_content); |
471 WriteParam(m, p.ran_mixed_content); | |
472 } | 470 } |
473 static bool Read(const Message* m, void** iter, param_type* p) { | 471 static bool Read(const Message* m, void** iter, param_type* p) { |
474 return ReadParam(m, iter, &p->navigation_type) && | 472 return ReadParam(m, iter, &p->navigation_type) && |
475 ReadParam(m, iter, &p->relative_offset) && | 473 ReadParam(m, iter, &p->relative_offset) && |
476 ReadParam(m, iter, &p->navigation_index) && | 474 ReadParam(m, iter, &p->navigation_index) && |
477 ReadParam(m, iter, &p->title) && | 475 ReadParam(m, iter, &p->title) && |
478 ReadParam(m, iter, &p->url) && | 476 ReadParam(m, iter, &p->url) && |
479 ReadParam(m, iter, &p->security_style) && | 477 ReadParam(m, iter, &p->security_style) && |
480 ReadParam(m, iter, &p->displayed_mixed_content) && | 478 ReadParam(m, iter, &p->has_mixed_content); |
481 ReadParam(m, iter, &p->ran_mixed_content); | |
482 } | 479 } |
483 static void Log(const param_type& p, std::wstring* l) { | 480 static void Log(const param_type& p, std::wstring* l) { |
484 l->append(L"("); | 481 l->append(L"("); |
485 LogParam(p.navigation_type, l); | 482 LogParam(p.navigation_type, l); |
486 l->append(L", "); | 483 l->append(L", "); |
487 LogParam(p.relative_offset, l); | 484 LogParam(p.relative_offset, l); |
488 l->append(L", "); | 485 l->append(L", "); |
489 LogParam(p.navigation_index, l); | 486 LogParam(p.navigation_index, l); |
490 l->append(L", "); | 487 l->append(L", "); |
491 LogParam(p.title, l); | 488 LogParam(p.title, l); |
492 l->append(L", "); | 489 l->append(L", "); |
493 LogParam(p.url, l); | 490 LogParam(p.url, l); |
494 l->append(L", "); | 491 l->append(L", "); |
495 LogParam(p.security_style, l); | 492 LogParam(p.security_style, l); |
496 l->append(L", "); | 493 l->append(L", "); |
497 LogParam(p.displayed_mixed_content, l); | 494 LogParam(p.has_mixed_content, l); |
498 l->append(L", "); | |
499 LogParam(p.ran_mixed_content, l); | |
500 l->append(L")"); | 495 l->append(L")"); |
501 } | 496 } |
502 }; | 497 }; |
503 | 498 |
504 // A stripped down version of ContextMenuParams in webkit/glue/context_menu.h. | 499 // A stripped down version of ContextMenuParams in webkit/glue/context_menu.h. |
505 struct ContextMenuParams { | 500 struct ContextMenuParams { |
506 // The x coordinate for displaying the menu. | 501 // The x coordinate for displaying the menu. |
507 int screen_x; | 502 int screen_x; |
508 | 503 |
509 // The y coordinate for displaying the menu. | 504 // The y coordinate for displaying the menu. |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 } | 608 } |
614 }; | 609 }; |
615 | 610 |
616 } // namespace IPC | 611 } // namespace IPC |
617 | 612 |
618 #define MESSAGES_INTERNAL_FILE \ | 613 #define MESSAGES_INTERNAL_FILE \ |
619 "chrome/test/automation/automation_messages_internal.h" | 614 "chrome/test/automation/automation_messages_internal.h" |
620 #include "ipc/ipc_message_macros.h" | 615 #include "ipc/ipc_message_macros.h" |
621 | 616 |
622 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_MESSAGES_H__ | 617 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_MESSAGES_H__ |
OLD | NEW |