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 | |
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')
-rw-r--r-- | chrome/common/chrome_constants.cc | 2 | ||||
-rw-r--r-- | chrome/common/chrome_constants.h | 3 | ||||
-rw-r--r-- | chrome/common/render_messages.h | 16 | ||||
-rw-r--r-- | chrome/common/render_messages_internal.h | 4 |
4 files changed, 21 insertions, 4 deletions
diff --git a/chrome/common/chrome_constants.cc b/chrome/common/chrome_constants.cc index fe4e0fe..e88c835 100644 --- a/chrome/common/chrome_constants.cc +++ b/chrome/common/chrome_constants.cc @@ -131,6 +131,8 @@ const bool kRecordModeEnabled = false; const int kHistogramSynchronizerReservedSequenceNumber = 0; +const int kMaxSessionHistoryEntries = 50; + } // namespace chrome #undef FPL diff --git a/chrome/common/chrome_constants.h b/chrome/common/chrome_constants.h index 0fe7d13..abe0283 100644 --- a/chrome/common/chrome_constants.h +++ b/chrome/common/chrome_constants.h @@ -79,6 +79,9 @@ extern const bool kRecordModeEnabled; extern const int kHistogramSynchronizerReservedSequenceNumber; +// The maximum number of session history entries per tab. +extern const int kMaxSessionHistoryEntries; + } // namespace chrome #endif // CHROME_COMMON_CHROME_CONSTANTS_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<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) && diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index d07665a..b6ee2a4 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -508,10 +508,6 @@ IPC_BEGIN_MESSAGES(View) // Used to instruct the RenderView to go into "view source" mode. IPC_MESSAGE_ROUTED0(ViewMsg_EnableViewSourceMode) - IPC_MESSAGE_ROUTED2(ViewMsg_UpdateBackForwardListCount, - int /* back_list_count */, - int /* forward_list_count */) - // Retreive information from the MSAA DOM subtree, for accessibility purposes. IPC_SYNC_MESSAGE_ROUTED1_1(ViewMsg_GetAccessibilityInfo, webkit_glue::WebAccessibility::InParams |