Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: chrome/common/render_messages.h

Issue 2775003: Added plumbing to transport the frame name between RenderViewHost and the Webkit layer. (Closed)
Patch Set: Final version for the record Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/visitedlink_unittest.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 2535
2515 template<> 2536 template<>
2516 struct ParamTraits<ViewMsg_New_Params> { 2537 struct ParamTraits<ViewMsg_New_Params> {
2517 typedef ViewMsg_New_Params param_type; 2538 typedef ViewMsg_New_Params param_type;
2518 static void Write(Message* m, const param_type& p) { 2539 static void Write(Message* m, const param_type& p) {
2519 WriteParam(m, p.parent_window); 2540 WriteParam(m, p.parent_window);
2520 WriteParam(m, p.renderer_preferences); 2541 WriteParam(m, p.renderer_preferences);
2521 WriteParam(m, p.web_preferences); 2542 WriteParam(m, p.web_preferences);
2522 WriteParam(m, p.view_id); 2543 WriteParam(m, p.view_id);
2523 WriteParam(m, p.session_storage_namespace_id); 2544 WriteParam(m, p.session_storage_namespace_id);
2545 WriteParam(m, p.frame_name);
2524 } 2546 }
2525 2547
2526 static bool Read(const Message* m, void** iter, param_type* p) { 2548 static bool Read(const Message* m, void** iter, param_type* p) {
2527 return 2549 return
2528 ReadParam(m, iter, &p->parent_window) && 2550 ReadParam(m, iter, &p->parent_window) &&
2529 ReadParam(m, iter, &p->renderer_preferences) && 2551 ReadParam(m, iter, &p->renderer_preferences) &&
2530 ReadParam(m, iter, &p->web_preferences) && 2552 ReadParam(m, iter, &p->web_preferences) &&
2531 ReadParam(m, iter, &p->view_id) && 2553 ReadParam(m, iter, &p->view_id) &&
2532 ReadParam(m, iter, &p->session_storage_namespace_id); 2554 ReadParam(m, iter, &p->session_storage_namespace_id) &&
2555 ReadParam(m, iter, &p->frame_name);
2533 } 2556 }
2534 static void Log(const param_type& p, std::wstring* l) { 2557 static void Log(const param_type& p, std::wstring* l) {
2535 l->append(L"("); 2558 l->append(L"(");
2536 LogParam(p.parent_window, l); 2559 LogParam(p.parent_window, l);
2537 l->append(L", "); 2560 l->append(L", ");
2538 LogParam(p.renderer_preferences, l); 2561 LogParam(p.renderer_preferences, l);
2539 l->append(L", "); 2562 l->append(L", ");
2540 LogParam(p.web_preferences, l); 2563 LogParam(p.web_preferences, l);
2541 l->append(L", "); 2564 l->append(L", ");
2542 LogParam(p.view_id, l); 2565 LogParam(p.view_id, l);
2543 l->append(L", "); 2566 l->append(L", ");
2544 LogParam(p.session_storage_namespace_id, l); 2567 LogParam(p.session_storage_namespace_id, l);
2568 l->append(L", ");
2569 LogParam(p.frame_name, l);
2545 l->append(L")"); 2570 l->append(L")");
2546 } 2571 }
2547 }; 2572 };
2548 2573
2549 template <> 2574 template <>
2550 struct SimilarTypeTraits<TranslateErrors::Type> { 2575 struct SimilarTypeTraits<TranslateErrors::Type> {
2551 typedef int Type; 2576 typedef int Type;
2552 }; 2577 };
2553 2578
2554 template<> 2579 template<>
(...skipping 30 matching lines...) Expand all
2585 break; 2610 break;
2586 default: 2611 default:
2587 l->append(L"(UNKNOWN, "); 2612 l->append(L"(UNKNOWN, ");
2588 } 2613 }
2589 LogParam(p.title, l); 2614 LogParam(p.title, l);
2590 l->append(L", "); 2615 l->append(L", ");
2591 LogParam(p.default_file_name, l); 2616 LogParam(p.default_file_name, l);
2592 } 2617 }
2593 }; 2618 };
2594 2619
2620 template<>
2621 struct ParamTraits<ViewHostMsg_CreateWindow_Params> {
2622 typedef ViewHostMsg_CreateWindow_Params param_type;
2623 static void Write(Message* m, const param_type& p) {
2624 WriteParam(m, p.opener_id);
2625 WriteParam(m, p.user_gesture);
2626 WriteParam(m, p.window_container_type);
2627 WriteParam(m, p.session_storage_namespace_id);
2628 WriteParam(m, p.frame_name);
2629 }
2630 static bool Read(const Message* m, void** iter, param_type* p) {
2631 return
2632 ReadParam(m, iter, &p->opener_id) &&
2633 ReadParam(m, iter, &p->user_gesture) &&
2634 ReadParam(m, iter, &p->window_container_type) &&
2635 ReadParam(m, iter, &p->session_storage_namespace_id) &&
2636 ReadParam(m, iter, &p->frame_name);
2637 }
2638 static void Log(const param_type& p, std::wstring* l) {
2639 l->append(L"(");
2640 LogParam(p.opener_id, l);
2641 l->append(L", ");
2642 LogParam(p.user_gesture, l);
2643 l->append(L", ");
2644 LogParam(p.window_container_type, l);
2645 l->append(L", ");
2646 LogParam(p.session_storage_namespace_id, l);
2647 l->append(L", ");
2648 LogParam(p.frame_name, l);
2649 l->append(L")");
2650 }
2651 };
2652
2595 template <> 2653 template <>
2596 struct ParamTraits<ExtensionExtent> { 2654 struct ParamTraits<ExtensionExtent> {
2597 typedef ExtensionExtent param_type; 2655 typedef ExtensionExtent param_type;
2598 static void Write(Message* m, const param_type& p) { 2656 static void Write(Message* m, const param_type& p) {
2599 WriteParam(m, p.origin()); 2657 WriteParam(m, p.origin());
2600 WriteParam(m, p.paths()); 2658 WriteParam(m, p.paths());
2601 } 2659 }
2602 static bool Read(const Message* m, void** iter, param_type* p) { 2660 static bool Read(const Message* m, void** iter, param_type* p) {
2603 GURL origin; 2661 GURL origin;
2604 std::vector<std::string> paths; 2662 std::vector<std::string> paths;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
2706 l->append(L")"); 2764 l->append(L")");
2707 } 2765 }
2708 }; 2766 };
2709 2767
2710 } // namespace IPC 2768 } // namespace IPC
2711 2769
2712 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" 2770 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h"
2713 #include "ipc/ipc_message_macros.h" 2771 #include "ipc/ipc_message_macros.h"
2714 2772
2715 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ 2773 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
OLDNEW
« no previous file with comments | « chrome/browser/visitedlink_unittest.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698