diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-18 23:03:00 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-18 23:03:00 +0000 |
commit | 3cc72b1caa55ca87811d8fab1ac9d55f05c2d496 (patch) | |
tree | 4379348afc5100d4188fb03650aa2f8013f5f254 /chrome/common/render_messages.h | |
parent | 330a9d04c938c3e79c30faade3713a1378b9bdeb (diff) | |
download | chromium_src-3cc72b1caa55ca87811d8fab1ac9d55f05c2d496.zip chromium_src-3cc72b1caa55ca87811d8fab1ac9d55f05c2d496.tar.gz chromium_src-3cc72b1caa55ca87811d8fab1ac9d55f05c2d496.tar.bz2 |
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
Diffstat (limited to 'chrome/common/render_messages.h')
-rw-r--r-- | chrome/common/render_messages.h | 16 |
1 files changed, 16 insertions, 0 deletions
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<ViewMsg_Navigate_Params> { 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<ViewMsg_Navigate_Params> { 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) && |