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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2643063002: Refactor Blink's ServiceConnector and add ability to mock in layout tests (Closed)
Patch Set: Fix build Created 3 years, 9 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
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 52404ecc9852bd4ff6b3fd1a6bf1af234b877311..cf1ab468d1bb7baa5c70adc61ac132c7d4302e4e 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -121,6 +121,8 @@
#include "content/renderer/media/user_media_client_impl.h"
#include "content/renderer/media/web_media_element_source_utils.h"
#include "content/renderer/media/webmediaplayer_ms.h"
+#include "content/renderer/mojo/blink_connector_impl.h"
+#include "content/renderer/mojo/blink_connector_js_wrapper.h"
#include "content/renderer/mojo/blink_interface_registry_impl.h"
#include "content/renderer/mojo/interface_provider_js_wrapper.h"
#include "content/renderer/mojo_bindings_controller.h"
@@ -134,6 +136,7 @@
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/render_view_impl.h"
#include "content/renderer/render_widget_fullscreen_pepper.h"
+#include "content/renderer/renderer_blink_platform_impl.h"
#include "content/renderer/renderer_webapplicationcachehost_impl.h"
#include "content/renderer/renderer_webcolorchooser_impl.h"
#include "content/renderer/savable_resources.h"
@@ -2651,6 +2654,12 @@ void RenderFrameImpl::EnsureMojoBuiltinsAreAvailable(
InterfaceProviderJsWrapper::Create(isolate, context,
RenderThread::Get()->GetConnector())
.ToV8());
+ registry->AddBuiltinModule(
+ isolate, BlinkConnectorJsWrapper::kModuleName,
+ BlinkConnectorJsWrapper::Create(
+ isolate, context,
+ RenderThreadImpl::current()->blink_platform_impl()->connector())
+ .ToV8());
}
void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level,
« no previous file with comments | « content/renderer/mojo/blink_connector_js_wrapper.cc ('k') | content/renderer/renderer_blink_platform_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698