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

Unified Diff: content/renderer/render_thread_impl.h

Issue 236813002: Move Mojo channel initialization closer to IPC::Channel setup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixup Created 6 years, 8 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_thread_impl.h
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 4c945b1f971141ac37b3affc4fb0318dd6c390b6..366dd01810b92b059c86b3d69ca5bacd6e94434e 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -19,7 +19,9 @@
#include "content/child/child_thread.h"
#include "content/common/content_export.h"
#include "content/common/gpu/client/gpu_channel_host.h"
+#include "content/common/render_process.mojom.h"
#include "content/public/renderer/render_thread.h"
+#include "content/renderer/mojo/mojo_application.h"
#include "ipc/ipc_channel_proxy.h"
#include "ui/gfx/native_widget_types.h"
@@ -107,7 +109,9 @@ class WebRTCIdentityService;
// The routing IDs correspond to RenderView instances.
class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
public ChildThread,
- public GpuChannelHostFactory {
+ public GpuChannelHostFactory,
+ public mojo::ShellClient,
+ public IRenderProcess {
public:
static RenderThreadImpl* current();
@@ -401,6 +405,16 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
size_t height,
unsigned internalformat) OVERRIDE;
+ // mojo::ShellClient implementation:
+ virtual void AcceptConnection(
+ const mojo::String& url,
+ mojo::ScopedMessagePipeHandle message_pipe) OVERRIDE;
+
+ // IRenderProcess implementation:
+ virtual void SetWebUIHandle(
+ int32 view_routing_id,
+ mojo::ScopedMessagePipeHandle web_ui_handle) OVERRIDE;
+
void Init();
void OnSetZoomLevelForCurrentURL(const std::string& scheme,
@@ -432,6 +446,9 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread,
scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateOffscreenContext3d();
+ MojoApplication mojo_application_;
+ mojo::RemotePtr<IRenderProcessHost> render_process_host_;
+
// These objects live solely on the render thread.
scoped_ptr<AppCacheDispatcher> appcache_dispatcher_;
scoped_ptr<DomStorageDispatcher> dom_storage_dispatcher_;

Powered by Google App Engine
This is Rietveld 408576698