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

Unified Diff: content/child/child_thread.h

Issue 236813002: Move Mojo channel initialization closer to IPC::Channel setup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more missing deps 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
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/child/child_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread.h
diff --git a/content/child/child_thread.h b/content/child/child_thread.h
index f8d9bf4367773d8cbaf85adb820ca479a53d9f7a..6af7016fddf96c913800fc601ab9c89e97a037e1 100644
--- a/content/child/child_thread.h
+++ b/content/child/child_thread.h
@@ -16,6 +16,7 @@
#include "content/common/content_export.h"
#include "content/common/message_router.h"
#include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
+#include "mojo/public/interfaces/shell/shell.mojom.h"
namespace base {
class MessageLoop;
@@ -43,6 +44,7 @@ class ChildHistogramMessageFilter;
class ChildResourceMessageFilter;
class ChildSharedBitmapManager;
class FileSystemDispatcher;
+class MojoApplication;
class ServiceWorkerDispatcher;
class ServiceWorkerMessageFilter;
class QuotaDispatcher;
@@ -54,7 +56,9 @@ class WebSocketDispatcher;
struct RequestInfo;
// The main thread of a child process derives from this class.
-class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender {
+class CONTENT_EXPORT ChildThread : public IPC::Listener,
+ public IPC::Sender,
+ public mojo::ShellClient {
public:
// Creates the thread.
ChildThread();
@@ -170,6 +174,11 @@ class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender {
virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
virtual void OnChannelError() OVERRIDE;
+ // mojo::ShellClient implementation:
+ virtual void AcceptConnection(
+ const mojo::String& service_name,
+ mojo::ScopedMessagePipeHandle message_pipe) OVERRIDE;
+
private:
class ChildThreadMessageRouter : public MessageRouter {
public:
@@ -197,6 +206,8 @@ class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender {
void EnsureConnected();
+ scoped_ptr<MojoApplication> mojo_application_;
+
std::string channel_name_;
scoped_ptr<IPC::SyncChannel> channel_;
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/child/child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698