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

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

Issue 2420843004: Clean up mojom::Renderer usage in RPH (Closed)
Patch Set: rebase Created 4 years, 2 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_process_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/mock_render_process_host.cc
diff --git a/content/public/test/mock_render_process_host.cc b/content/public/test/mock_render_process_host.cc
index 067b38558ce47c24d8e7200bc10ae6d83fa726dd..2e73507666d6fdf2e77e72fdcfcc8ae1565f02d0 100644
--- a/content/public/test/mock_render_process_host.cc
+++ b/content/public/test/mock_render_process_host.cc
@@ -20,6 +20,7 @@
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/common/child_process_host_impl.h"
#include "content/common/frame_messages.h"
+#include "content/common/renderer.mojom.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/global_request_id.h"
#include "content/public/browser/notification_details.h"
@@ -28,6 +29,7 @@
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_widget_host_iterator.h"
#include "content/public/browser/storage_partition.h"
+#include "mojo/public/cpp/bindings/associated_interface_ptr.h"
namespace content {
@@ -299,6 +301,14 @@ bool MockRenderProcessHost::IsWorkerRefCountDisabled() {
void MockRenderProcessHost::PurgeAndSuspend() {}
+mojom::Renderer* MockRenderProcessHost::GetRendererInterface() {
+ if (!renderer_interface_) {
+ renderer_interface_.reset(new mojom::RendererAssociatedPtr);
+ mojo::GetDummyProxyForTesting(renderer_interface_.get());
+ }
+ return renderer_interface_->get();
+}
+
void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) {
RenderProcessHostImpl::FilterURL(this, empty_allowed, url);
}
« no previous file with comments | « content/public/test/mock_render_process_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698