From 3cc72b1caa55ca87811d8fab1ac9d55f05c2d496 Mon Sep 17 00:00:00 2001 From: "darin@chromium.org" Date: Thu, 18 Mar 2010 23:03:00 +0000 Subject: Send session history offset and length parameters in the Navigate message to keep the renderer's notion of those values properly synchronized with the NavigationController. R=brettw BUG=18062 TEST=see session_history_uitest.cc Review URL: http://codereview.chromium.org/1090002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42022 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/render_messages.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'chrome/common/render_messages.h') diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 07639d4..0046696 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -85,6 +85,16 @@ struct ViewMsg_Navigate_Params { // ViewHostMsg_FrameNavigate message. int32 page_id; + // If page_id is -1, then pending_history_list_offset will also be -1. + // Otherwise, it contains the offset into the history list corresponding to + // the current navigation. + int pending_history_list_offset; + + // Informs the RenderView of where its current page contents reside in + // session history and the total size of the session history list. + int current_history_list_offset; + int current_history_list_length; + // The URL to load. GURL url; @@ -810,6 +820,9 @@ struct ParamTraits { typedef ViewMsg_Navigate_Params param_type; static void Write(Message* m, const param_type& p) { WriteParam(m, p.page_id); + WriteParam(m, p.pending_history_list_offset); + WriteParam(m, p.current_history_list_offset); + WriteParam(m, p.current_history_list_length); WriteParam(m, p.url); WriteParam(m, p.referrer); WriteParam(m, p.transition); @@ -820,6 +833,9 @@ struct ParamTraits { static bool Read(const Message* m, void** iter, param_type* p) { return ReadParam(m, iter, &p->page_id) && + ReadParam(m, iter, &p->pending_history_list_offset) && + ReadParam(m, iter, &p->current_history_list_offset) && + ReadParam(m, iter, &p->current_history_list_length) && ReadParam(m, iter, &p->url) && ReadParam(m, iter, &p->referrer) && ReadParam(m, iter, &p->transition) && -- cgit v1.1