| Index: content/renderer/render_view.cc
|
| diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc
|
| index 972349f99357ff3f7c6cac7319e352f3c04c2599..7dbcd4b0bafb7c81d5008846fb23ab9c786698fe 100644
|
| --- a/content/renderer/render_view.cc
|
| +++ b/content/renderer/render_view.cc
|
| @@ -703,6 +703,7 @@ bool RenderView::OnMessageReceived(const IPC::Message& message) {
|
| #endif
|
| IPC_MESSAGE_HANDLER(ViewMsg_UpdateRemoteAccessClientFirewallTraversal,
|
| OnUpdateRemoteAccessClientFirewallTraversal)
|
| + IPC_MESSAGE_HANDLER(ViewMsg_ShiftHistory, OnShiftHistory)
|
| // Have the super handle all other messages.
|
| IPC_MESSAGE_UNHANDLED(handled = RenderWidget::OnMessageReceived(message))
|
| IPC_END_MESSAGE_MAP()
|
| @@ -1017,6 +1018,21 @@ void RenderView::OnScrollFocusedEditableNodeIntoView() {
|
| }
|
| }
|
|
|
| +void RenderView::OnShiftHistory(int history_length) {
|
| + DCHECK(history_length >= 0);
|
| + DCHECK(history_list_length_ == 0 || history_list_length_ == 1);
|
| + int current_page_id = -1;
|
| + if (history_list_offset_ >= 0)
|
| + current_page_id = history_page_ids_[history_list_offset_];
|
| + int new_history_list_length = history_length + history_list_length_;
|
| + std::vector<int32> new_history_page_ids_(new_history_list_length, -1);
|
| + if (current_page_id != -1)
|
| + new_history_page_ids_[new_history_list_length - 1] = current_page_id;
|
| + new_history_page_ids_.swap(history_page_ids_);
|
| + history_list_offset_ = new_history_list_length - 1;
|
| + history_list_length_ = new_history_list_length;
|
| +}
|
| +
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| // Tell the embedding application that the URL of the active page has changed
|
|
|