| 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 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ | 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ |
| 6 #define CHROME_COMMON_RENDER_MESSAGES_H_ | 6 #define CHROME_COMMON_RENDER_MESSAGES_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 RendererPreferences renderer_preferences; | 632 RendererPreferences renderer_preferences; |
| 633 | 633 |
| 634 // Preferences for this view. | 634 // Preferences for this view. |
| 635 WebPreferences web_preferences; | 635 WebPreferences web_preferences; |
| 636 | 636 |
| 637 // The ID of the view to be created. | 637 // The ID of the view to be created. |
| 638 int32 view_id; | 638 int32 view_id; |
| 639 | 639 |
| 640 // The session storage namespace ID this view should use. | 640 // The session storage namespace ID this view should use. |
| 641 int64 session_storage_namespace_id; | 641 int64 session_storage_namespace_id; |
| 642 |
| 643 // The name of the frame associated with this view (or empty if none). |
| 644 string16 frame_name; |
| 645 }; |
| 646 |
| 647 struct ViewHostMsg_CreateWindow_Params { |
| 648 // Routing ID of the view initiating the open. |
| 649 int opener_id; |
| 650 |
| 651 // True if this open request came in the context of a user gesture. |
| 652 bool user_gesture; |
| 653 |
| 654 // Type of window requested. |
| 655 WindowContainerType window_container_type; |
| 656 |
| 657 // The session storage namespace ID this view should use. |
| 658 int64 session_storage_namespace_id; |
| 659 |
| 660 // The name of the resulting frame that should be created (empty if none |
| 661 // has been specified). |
| 662 string16 frame_name; |
| 642 }; | 663 }; |
| 643 | 664 |
| 644 struct ViewHostMsg_RunFileChooser_Params { | 665 struct ViewHostMsg_RunFileChooser_Params { |
| 645 enum Mode { | 666 enum Mode { |
| 646 // Requires that the file exists before allowing the user to pick it. | 667 // Requires that the file exists before allowing the user to pick it. |
| 647 Open, | 668 Open, |
| 648 | 669 |
| 649 // Like Open, but allows picking multiple files to open. | 670 // Like Open, but allows picking multiple files to open. |
| 650 OpenMultiple, | 671 OpenMultiple, |
| 651 | 672 |
| (...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2510 | 2531 |
| 2511 template<> | 2532 template<> |
| 2512 struct ParamTraits<ViewMsg_New_Params> { | 2533 struct ParamTraits<ViewMsg_New_Params> { |
| 2513 typedef ViewMsg_New_Params param_type; | 2534 typedef ViewMsg_New_Params param_type; |
| 2514 static void Write(Message* m, const param_type& p) { | 2535 static void Write(Message* m, const param_type& p) { |
| 2515 WriteParam(m, p.parent_window); | 2536 WriteParam(m, p.parent_window); |
| 2516 WriteParam(m, p.renderer_preferences); | 2537 WriteParam(m, p.renderer_preferences); |
| 2517 WriteParam(m, p.web_preferences); | 2538 WriteParam(m, p.web_preferences); |
| 2518 WriteParam(m, p.view_id); | 2539 WriteParam(m, p.view_id); |
| 2519 WriteParam(m, p.session_storage_namespace_id); | 2540 WriteParam(m, p.session_storage_namespace_id); |
| 2541 WriteParam(m, p.frame_name); |
| 2520 } | 2542 } |
| 2521 | 2543 |
| 2522 static bool Read(const Message* m, void** iter, param_type* p) { | 2544 static bool Read(const Message* m, void** iter, param_type* p) { |
| 2523 return | 2545 return |
| 2524 ReadParam(m, iter, &p->parent_window) && | 2546 ReadParam(m, iter, &p->parent_window) && |
| 2525 ReadParam(m, iter, &p->renderer_preferences) && | 2547 ReadParam(m, iter, &p->renderer_preferences) && |
| 2526 ReadParam(m, iter, &p->web_preferences) && | 2548 ReadParam(m, iter, &p->web_preferences) && |
| 2527 ReadParam(m, iter, &p->view_id) && | 2549 ReadParam(m, iter, &p->view_id) && |
| 2528 ReadParam(m, iter, &p->session_storage_namespace_id); | 2550 ReadParam(m, iter, &p->session_storage_namespace_id) && |
| 2551 ReadParam(m, iter, &p->frame_name); |
| 2529 } | 2552 } |
| 2530 static void Log(const param_type& p, std::wstring* l) { | 2553 static void Log(const param_type& p, std::wstring* l) { |
| 2531 l->append(L"("); | 2554 l->append(L"("); |
| 2532 LogParam(p.parent_window, l); | 2555 LogParam(p.parent_window, l); |
| 2533 l->append(L", "); | 2556 l->append(L", "); |
| 2534 LogParam(p.renderer_preferences, l); | 2557 LogParam(p.renderer_preferences, l); |
| 2535 l->append(L", "); | 2558 l->append(L", "); |
| 2536 LogParam(p.web_preferences, l); | 2559 LogParam(p.web_preferences, l); |
| 2537 l->append(L", "); | 2560 l->append(L", "); |
| 2538 LogParam(p.view_id, l); | 2561 LogParam(p.view_id, l); |
| 2539 l->append(L", "); | 2562 l->append(L", "); |
| 2540 LogParam(p.session_storage_namespace_id, l); | 2563 LogParam(p.session_storage_namespace_id, l); |
| 2564 l->append(L", "); |
| 2565 LogParam(p.frame_name, l); |
| 2541 l->append(L")"); | 2566 l->append(L")"); |
| 2542 } | 2567 } |
| 2543 }; | 2568 }; |
| 2544 | 2569 |
| 2545 template <> | 2570 template <> |
| 2546 struct SimilarTypeTraits<TranslateErrors::Type> { | 2571 struct SimilarTypeTraits<TranslateErrors::Type> { |
| 2547 typedef int Type; | 2572 typedef int Type; |
| 2548 }; | 2573 }; |
| 2549 | 2574 |
| 2550 template<> | 2575 template<> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 2581 break; | 2606 break; |
| 2582 default: | 2607 default: |
| 2583 l->append(L"(UNKNOWN, "); | 2608 l->append(L"(UNKNOWN, "); |
| 2584 } | 2609 } |
| 2585 LogParam(p.title, l); | 2610 LogParam(p.title, l); |
| 2586 l->append(L", "); | 2611 l->append(L", "); |
| 2587 LogParam(p.default_file_name, l); | 2612 LogParam(p.default_file_name, l); |
| 2588 } | 2613 } |
| 2589 }; | 2614 }; |
| 2590 | 2615 |
| 2616 template<> |
| 2617 struct ParamTraits<ViewHostMsg_CreateWindow_Params> { |
| 2618 typedef ViewHostMsg_CreateWindow_Params param_type; |
| 2619 static void Write(Message* m, const param_type& p) { |
| 2620 WriteParam(m, p.opener_id); |
| 2621 WriteParam(m, p.user_gesture); |
| 2622 WriteParam(m, p.window_container_type); |
| 2623 WriteParam(m, p.session_storage_namespace_id); |
| 2624 WriteParam(m, p.frame_name); |
| 2625 } |
| 2626 static bool Read(const Message* m, void** iter, param_type* p) { |
| 2627 return |
| 2628 ReadParam(m, iter, &p->opener_id) && |
| 2629 ReadParam(m, iter, &p->user_gesture) && |
| 2630 ReadParam(m, iter, &p->window_container_type) && |
| 2631 ReadParam(m, iter, &p->session_storage_namespace_id) && |
| 2632 ReadParam(m, iter, &p->frame_name); |
| 2633 } |
| 2634 static void Log(const param_type& p, std::wstring* l) { |
| 2635 l->append(L"("); |
| 2636 LogParam(p.opener_id, l); |
| 2637 l->append(L", "); |
| 2638 LogParam(p.user_gesture, l); |
| 2639 l->append(L", "); |
| 2640 LogParam(p.window_container_type, l); |
| 2641 l->append(L", "); |
| 2642 LogParam(p.session_storage_namespace_id, l); |
| 2643 l->append(L", "); |
| 2644 LogParam(p.frame_name, l); |
| 2645 l->append(L")"); |
| 2646 } |
| 2647 }; |
| 2648 |
| 2591 template <> | 2649 template <> |
| 2592 struct ParamTraits<ExtensionExtent> { | 2650 struct ParamTraits<ExtensionExtent> { |
| 2593 typedef ExtensionExtent param_type; | 2651 typedef ExtensionExtent param_type; |
| 2594 static void Write(Message* m, const param_type& p) { | 2652 static void Write(Message* m, const param_type& p) { |
| 2595 WriteParam(m, p.origin()); | 2653 WriteParam(m, p.origin()); |
| 2596 WriteParam(m, p.paths()); | 2654 WriteParam(m, p.paths()); |
| 2597 } | 2655 } |
| 2598 static bool Read(const Message* m, void** iter, param_type* p) { | 2656 static bool Read(const Message* m, void** iter, param_type* p) { |
| 2599 GURL origin; | 2657 GURL origin; |
| 2600 std::vector<std::string> paths; | 2658 std::vector<std::string> paths; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2702 l->append(L")"); | 2760 l->append(L")"); |
| 2703 } | 2761 } |
| 2704 }; | 2762 }; |
| 2705 | 2763 |
| 2706 } // namespace IPC | 2764 } // namespace IPC |
| 2707 | 2765 |
| 2708 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 2766 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
| 2709 #include "ipc/ipc_message_macros.h" | 2767 #include "ipc/ipc_message_macros.h" |
| 2710 | 2768 |
| 2711 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 2769 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
| OLD | NEW |