Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Unified Diff: content/public/test/mock_render_thread.cc

Issue 133483002: Fix idle handlers not being called. The problem was that RenderThread::AddRoute was assuming that e… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/test/mock_render_thread.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/mock_render_thread.cc
===================================================================
--- content/public/test/mock_render_thread.cc (revision 244175)
+++ content/public/test/mock_render_thread.cc (working copy)
@@ -8,6 +8,7 @@
#include "content/common/frame_messages.h"
#include "content/common/view_messages.h"
#include "content/public/renderer/render_process_observer.h"
+#include "content/renderer/render_view_impl.h"
#include "ipc/ipc_message_utils.h"
#include "ipc/ipc_sync_message.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -88,17 +89,9 @@
}
void MockRenderThread::AddRoute(int32 routing_id, IPC::Listener* listener) {
- // We may hear this for views created from OnCreateWindow as well,
- // in which case we don't want to track the new widget.
- if (routing_id_ == routing_id)
- widget_ = listener;
}
void MockRenderThread::RemoveRoute(int32 routing_id) {
- // We may hear this for views created from OnCreateWindow as well,
- // in which case we don't want to track the new widget.
- if (routing_id_ == routing_id)
- widget_ = NULL;
}
int MockRenderThread::GenerateRoutingID() {
@@ -137,12 +130,6 @@
ResourceDispatcherDelegate* delegate) {
}
-void MockRenderThread::WidgetHidden() {
-}
-
-void MockRenderThread::WidgetRestored() {
-}
-
void MockRenderThread::EnsureWebKitInitialized() {
}
@@ -207,7 +194,7 @@
void MockRenderThread::SendCloseMessage() {
ViewMsg_Close msg(routing_id_);
- widget_->OnMessageReceived(msg);
+ RenderViewImpl::FromRoutingID(routing_id_)->OnMessageReceived(msg);
}
// The Widget expects to be returned valid route_id.
« no previous file with comments | « content/public/test/mock_render_thread.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698