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

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

Issue 1090002: Send session history offset and length parameters in the Navigate message to... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | Annotate | Revision Log
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Navigation type not categorized by the other types. 78 // Navigation type not categorized by the other types.
79 NORMAL 79 NORMAL
80 }; 80 };
81 81
82 // The page_id for this navigation, or -1 if it is a new navigation. Back, 82 // The page_id for this navigation, or -1 if it is a new navigation. Back,
83 // Forward, and Reload navigations should have a valid page_id. If the load 83 // Forward, and Reload navigations should have a valid page_id. If the load
84 // succeeds, then this page_id will be reflected in the resultant 84 // succeeds, then this page_id will be reflected in the resultant
85 // ViewHostMsg_FrameNavigate message. 85 // ViewHostMsg_FrameNavigate message.
86 int32 page_id; 86 int32 page_id;
87 87
88 // If page_id is -1, then pending_history_list_offset will also be -1.
89 // Otherwise, it contains the offset into the history list corresponding to
90 // the current navigation.
91 int pending_history_list_offset;
92
93 // Informs the RenderView of where its current page contents reside in
94 // session history and the total size of the session history list.
95 int current_history_list_offset;
96 int current_history_list_length;
97
88 // The URL to load. 98 // The URL to load.
89 GURL url; 99 GURL url;
90 100
91 // The URL to send in the "Referer" header field. Can be empty if there is 101 // The URL to send in the "Referer" header field. Can be empty if there is
92 // no referrer. 102 // no referrer.
93 GURL referrer; 103 GURL referrer;
94 104
95 // The type of transition. 105 // The type of transition.
96 PageTransition::Type transition; 106 PageTransition::Type transition;
97 107
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 LogParam(control, l); 813 LogParam(control, l);
804 } 814 }
805 }; 815 };
806 816
807 // Traits for ViewMsg_Navigate_Params structure to pack/unpack. 817 // Traits for ViewMsg_Navigate_Params structure to pack/unpack.
808 template <> 818 template <>
809 struct ParamTraits<ViewMsg_Navigate_Params> { 819 struct ParamTraits<ViewMsg_Navigate_Params> {
810 typedef ViewMsg_Navigate_Params param_type; 820 typedef ViewMsg_Navigate_Params param_type;
811 static void Write(Message* m, const param_type& p) { 821 static void Write(Message* m, const param_type& p) {
812 WriteParam(m, p.page_id); 822 WriteParam(m, p.page_id);
823 WriteParam(m, p.pending_history_list_offset);
824 WriteParam(m, p.current_history_list_offset);
825 WriteParam(m, p.current_history_list_length);
813 WriteParam(m, p.url); 826 WriteParam(m, p.url);
814 WriteParam(m, p.referrer); 827 WriteParam(m, p.referrer);
815 WriteParam(m, p.transition); 828 WriteParam(m, p.transition);
816 WriteParam(m, p.state); 829 WriteParam(m, p.state);
817 WriteParam(m, p.navigation_type); 830 WriteParam(m, p.navigation_type);
818 WriteParam(m, p.request_time); 831 WriteParam(m, p.request_time);
819 } 832 }
820 static bool Read(const Message* m, void** iter, param_type* p) { 833 static bool Read(const Message* m, void** iter, param_type* p) {
821 return 834 return
822 ReadParam(m, iter, &p->page_id) && 835 ReadParam(m, iter, &p->page_id) &&
836 ReadParam(m, iter, &p->pending_history_list_offset) &&
837 ReadParam(m, iter, &p->current_history_list_offset) &&
838 ReadParam(m, iter, &p->current_history_list_length) &&
823 ReadParam(m, iter, &p->url) && 839 ReadParam(m, iter, &p->url) &&
824 ReadParam(m, iter, &p->referrer) && 840 ReadParam(m, iter, &p->referrer) &&
825 ReadParam(m, iter, &p->transition) && 841 ReadParam(m, iter, &p->transition) &&
826 ReadParam(m, iter, &p->state) && 842 ReadParam(m, iter, &p->state) &&
827 ReadParam(m, iter, &p->navigation_type) && 843 ReadParam(m, iter, &p->navigation_type) &&
828 ReadParam(m, iter, &p->request_time); 844 ReadParam(m, iter, &p->request_time);
829 } 845 }
830 static void Log(const param_type& p, std::wstring* l) { 846 static void Log(const param_type& p, std::wstring* l) {
831 l->append(L"("); 847 l->append(L"(");
832 LogParam(p.page_id, l); 848 LogParam(p.page_id, l);
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after
2651 } 2667 }
2652 }; 2668 };
2653 2669
2654 } // namespace IPC 2670 } // namespace IPC
2655 2671
2656 2672
2657 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" 2673 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h"
2658 #include "ipc/ipc_message_macros.h" 2674 #include "ipc/ipc_message_macros.h"
2659 2675
2660 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ 2676 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698