summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/common/render_messages_internal.h4
-rw-r--r--chrome/renderer/render_view.cc23
-rw-r--r--chrome/renderer/render_view.h11
3 files changed, 4 insertions, 34 deletions
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index fb94641..5b12febb 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -605,7 +605,7 @@ IPC_BEGIN_MESSAGES(ViewHost)
int /* route_id */,
ModalDialogEvent /* modal_dialog_event */)
- // Similar to ViewHostMsg_CreateView, except used for sub-widgets, like
+ // Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
// <select> dropdowns. This message is sent to the TabContents that
// contains the widget being created.
IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CreateWidget,
@@ -614,7 +614,7 @@ IPC_BEGIN_MESSAGES(ViewHost)
int /* route_id */)
// These two messages are sent to the parent RenderViewHost to display the
- // page/widget that was created by CreateView/CreateWidget. routing_id
+ // page/widget that was created by CreateWindow/CreateWidget. routing_id
// refers to the id that was returned from the Create message above.
// The initial_position parameter is a rectangle in screen coordinates.
//
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index a38a710..1907c80 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -68,7 +68,6 @@
#include "webkit/glue/webdropdata.h"
#include "webkit/glue/weberror.h"
#include "webkit/glue/webframe.h"
-#include "webkit/glue/webhistoryitem.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/webplugin_delegate.h"
@@ -1565,13 +1564,6 @@ WindowOpenDisposition RenderView::DispositionForNavigationAction(
url.SchemeIs(chrome::kViewSourceScheme)) {
OpenURL(webview, url, GURL(), disposition);
return IGNORE_ACTION; // Suppress the load here.
- } else if (url.SchemeIs(kBackForwardNavigationScheme)) {
- std::string offset_str = url.ExtractFileName();
- int offset;
- if (StringToInt(offset_str, &offset)) {
- GoToEntryAtOffset(offset);
- return IGNORE_ACTION; // The browser process handles this one.
- }
}
}
}
@@ -2459,20 +2451,7 @@ void RenderView::OnAutofillFormSubmitted(WebView* webview,
Send(new ViewHostMsg_AutofillFormSubmitted(routing_id_, form));
}
-WebHistoryItem* RenderView::GetHistoryEntryAtOffset(int offset) {
- // Our history list is kept in the browser process on the UI thread. Since
- // we can't make a sync IPC call to that thread without risking deadlock,
- // we use a trick: construct a fake history item of the form:
- // history://go/OFFSET
- // When WebCore tells us to navigate to it, we tell the browser process to
- // do a back/forward navigation instead.
-
- GURL url(StringPrintf("%s://go/%d", kBackForwardNavigationScheme, offset));
- history_navigation_item_ = WebHistoryItem::Create(url, L"", "", NULL);
- return history_navigation_item_.get();
-}
-
-void RenderView::GoToEntryAtOffset(int offset) {
+void RenderView::NavigateBackForwardSoon(int offset) {
history_back_list_count_ += offset;
history_forward_list_count_ -= offset;
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index e58a641..ee03c7a 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -279,7 +279,7 @@ class RenderView : public RenderWidget,
virtual void TakeFocus(WebView* webview, bool reverse);
virtual void JSOutOfMemory();
- virtual WebHistoryItem* GetHistoryEntryAtOffset(int offset);
+ virtual void NavigateBackForwardSoon(int offset);
virtual int GetHistoryBackListCount();
virtual int GetHistoryForwardListCount();
virtual void OnNavStateChanged(WebView* webview);
@@ -463,10 +463,6 @@ class RenderView : public RenderWidget,
// keyword search.
void AddGURLSearchProvider(const GURL& osd_url, bool autodetected);
- // Tells the browser process to navigate to a back/forward entry at the given
- // offset from current.
- void GoToEntryAtOffset(int offset);
-
// RenderView IPC message handlers
void SendThumbnail();
void OnPrintPages();
@@ -771,11 +767,6 @@ class RenderView : public RenderWidget,
// out of date responses.
int form_field_autofill_request_id_;
- // A cached WebHistoryItem used for back/forward navigations initiated by
- // WebCore (via the window.history.go API). We only have one such navigation
- // pending at a time.
- scoped_refptr<WebHistoryItem> history_navigation_item_;
-
// We need to prevent windows from closing themselves with a window.close()
// call while a blocked popup notification is being displayed. We cannot
// synchronously query the Browser process. We cannot wait for the Browser