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

Unified Diff: content/child/child_thread_impl.h

Issue 1461243002: [OLD ATTEMPT, DO NOT REVIEW] mustash: Enable connections to mus from the Chrome renderer Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Invert connection creation flow. Needs lots of work. Created 5 years, 1 month 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/child/child_thread_impl.h
diff --git a/content/child/child_thread_impl.h b/content/child/child_thread_impl.h
index eb90f703da1de3a2675563723eaeaed6688d74fa..fefcc37425fbc391f7149dab76a411e51a341156 100644
--- a/content/child/child_thread_impl.h
+++ b/content/child/child_thread_impl.h
@@ -14,13 +14,16 @@
#include "base/power_monitor/power_monitor.h"
#include "base/sequenced_task_runner.h"
#include "base/tracked_objects.h"
+#include "components/mus/public/interfaces/window_tree.mojom.h"
#include "content/child/mojo/mojo_application.h"
#include "content/common/content_export.h"
#include "content/common/message_router.h"
#include "content/common/mojo/channel_init.h"
#include "content/public/child/child_thread.h"
+#include "content/public/common/mojo_shell_connection.h"
#include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
#include "ipc/ipc_platform_file.h"
+#include "mojo/application/public/cpp/interface_factory.h"
namespace base {
class MessageLoop;
@@ -64,6 +67,8 @@ struct RequestInfo;
// The main thread of a child process derives from this class.
class CONTENT_EXPORT ChildThreadImpl
: public IPC::Listener,
+ public MojoShellConnection::Listener,
+ public mojo::InterfaceFactory<mus::mojom::WindowTreeClient>,
virtual public ChildThread {
public:
struct CONTENT_EXPORT Options;
@@ -203,6 +208,15 @@ class CONTENT_EXPORT ChildThreadImpl
void OnChannelConnected(int32 peer_pid) override;
void OnChannelError() override;
+ // MojoShellConnection::Listener implementation:
+ bool ConfigureIncomingConnection(
+ mojo::ApplicationConnection* connection) override;
+
+ // mojo::InterfaceFactory<mojom::WindowTreeClient> implementation.
+ void Create(
+ mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<mus::mojom::WindowTreeClient> request) override;
+
bool IsInBrowserProcess() const;
scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner();

Powered by Google App Engine
This is Rietveld 408576698