summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 20:21:01 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 20:21:01 +0000
commitdf8e6febb83b0b8897594abf24f1a38368732df9 (patch)
tree57c1cf8278bd5cda887ecb3fe7e33013525bedea /chrome/renderer
parent92ca623270d61b3f6574d4f721c5a7ba1ac64f1b (diff)
downloadchromium_src-df8e6febb83b0b8897594abf24f1a38368732df9.zip
chromium_src-df8e6febb83b0b8897594abf24f1a38368732df9.tar.gz
chromium_src-df8e6febb83b0b8897594abf24f1a38368732df9.tar.bz2
Instead of queuing ResourceDispatcher IPC messages in RenderView, use ResourceDispatcherHost's ability to block requests for a given route in the browser process. This is in prepration for switching to one ResourceDispatcher in the renderer process, instead of one per RenderView, to share more code between child processes.
I realize that this means that resource requests for RenderViews created by other RenderViews will start a little bit later now (after a hop to the UI thread and back), but I don't think it should lead to much delay (since if our UI thread is that bogged down, we have bigger problems). I'll make sure this is the case by looking at the page cyclers. Review URL: http://codereview.chromium.org/42005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11370 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_view.cc29
-rw-r--r--chrome/renderer/render_view.h8
2 files changed, 0 insertions, 37 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 5c2b948..bf010f3 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -188,7 +188,6 @@ RenderView::RenderView(RenderThreadBase* render_thread)
disable_popup_blocking_(false),
has_unload_listener_(false),
decrement_shared_popup_at_destruction_(false),
- waiting_for_create_window_ack_(false),
form_field_autofill_request_id_(0),
popup_notification_visible_(false),
delay_seconds_for_form_state_sync_(kDefaultDelaySecondsForFormStateSync) {
@@ -343,18 +342,6 @@ void RenderView::OnMessageReceived(const IPC::Message& message) {
main_frame ? main_frame->GetURL() : GURL());
#endif
- // If the current RenderView instance represents a popup, then we
- // need to wait for ViewMsg_CreatingNew_ACK to be sent by the browser.
- // As part of this ack we also receive the browser window handle, which
- // parents any plugins instantiated in this RenderView instance.
- // Plugins can be instantiated only when we receive the parent window
- // handle as they are child windows.
- if (waiting_for_create_window_ack_ &&
- resource_dispatcher_->IsResourceMessage(message)) {
- queued_resource_messages_.push(new IPC::Message(message));
- return;
- }
-
// Let the resource dispatcher intercept resource messages first.
if (resource_dispatcher_->OnMessageReceived(message))
return;
@@ -364,7 +351,6 @@ void RenderView::OnMessageReceived(const IPC::Message& message) {
return;
IPC_BEGIN_MESSAGE_MAP(RenderView, message)
- IPC_MESSAGE_HANDLER(ViewMsg_CreatingNew_ACK, OnCreatingNewAck)
IPC_MESSAGE_HANDLER(ViewMsg_CaptureThumbnail, SendThumbnail)
IPC_MESSAGE_HANDLER(ViewMsg_PrintPages, OnPrintPages)
IPC_MESSAGE_HANDLER(ViewMsg_Navigate, OnNavigate)
@@ -451,20 +437,6 @@ void RenderView::OnMessageReceived(const IPC::Message& message) {
IPC_END_MESSAGE_MAP()
}
-// Got a response from the browser after the renderer decided to create a new
-// view.
-void RenderView::OnCreatingNewAck(gfx::NativeViewId parent) {
- CompleteInit(parent);
- waiting_for_create_window_ack_ = false;
-
- while (!queued_resource_messages_.empty()) {
- IPC::Message* queued_msg = queued_resource_messages_.front();
- queued_resource_messages_.pop();
- resource_dispatcher_->OnMessageReceived(*queued_msg);
- delete queued_msg;
- }
-}
-
void RenderView::SendThumbnail() {
WebFrame* main_frame = webview()->GetMainFrame();
if (!main_frame)
@@ -1888,7 +1860,6 @@ WebView* RenderView::CreateWebView(WebView* webview, bool user_gesture) {
prefs, shared_popup_counter_,
routing_id);
view->set_opened_by_user_gesture(user_gesture);
- view->set_waiting_for_create_window_ack(true);
// Copy over the alternate error page URL so we can have alt error pages in
// the new render view (we don't need the browser to send the URL back down).
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index 17f4cd1..9a0ec22 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -442,7 +442,6 @@ class RenderView : public RenderWidget,
void GoToEntryAtOffset(int offset);
// RenderView IPC message handlers
- void OnCreatingNewAck(gfx::NativeViewId parent);
void SendThumbnail();
void OnPrintPages();
void OnNavigate(const ViewMsg_Navigate_Params& params);
@@ -620,10 +619,6 @@ class RenderView : public RenderWidget,
// A helper method used by WasOpenedByUserGesture.
bool WasOpenedByUserGestureHelper() const;
- void set_waiting_for_create_window_ack(bool wait) {
- waiting_for_create_window_ack_ = wait;
- }
-
// Handles resource loads for this view.
scoped_refptr<ResourceDispatcher> resource_dispatcher_;
@@ -785,9 +780,6 @@ class RenderView : public RenderWidget,
// to wait for an ACK from the browser before proceeding.
std::queue<IPC::Message*> queued_resource_messages_;
- // Set if we are waiting for an ack for ViewHostMsg_CreateWindow
- bool waiting_for_create_window_ack_;
-
// The id of the last request sent for form field autofill. Used to ignore
// out of date responses.
int form_field_autofill_request_id_;