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

Unified Diff: content/renderer/mojo/mojo_application.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/mojo/mojo_application.h
diff --git a/content/renderer/mojo/mojo_application.h b/content/renderer/mojo/mojo_application.h
new file mode 100644
index 0000000000000000000000000000000000000000..36251ebe744279ee8b64f70ef68624a76225e69c
--- /dev/null
+++ b/content/renderer/mojo/mojo_application.h
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_MOJO_MOJO_APPLICATION_H_
+#define CONTENT_RENDERER_MOJO_MOJO_APPLICATION_H_
+
+#include "content/common/mojo/mojo_channel_init.h"
+#include "ipc/ipc_platform_file.h"
+#include "mojo/public/cpp/bindings/remote_ptr.h"
+#include "mojo/public/interfaces/shell/shell.mojom.h"
+
+namespace IPC {
+class Message;
+}
+
+namespace content {
+
+class MojoApplication {
sky 2014/04/16 17:18:10 Description?
darin (slow to review) 2014/04/16 23:26:04 Will add.
+ public:
+ explicit MojoApplication(mojo::ShellClient* shell_client);
+ ~MojoApplication();
+
+ bool OnMessageReceived(const IPC::Message& msg);
+
+ mojo::Shell* shell() { return shell_.get(); }
+
+ private:
+ void OnActivate(const IPC::PlatformFileForTransit& file);
+
+ MojoChannelInit channel_init_;
+ mojo::RemotePtr<mojo::Shell> shell_;
+ mojo::ShellClient* shell_client_;
sky 2014/04/16 17:18:10 Document ownership.
darin (slow to review) 2014/04/16 23:26:04 Good idea.
+};
sky 2014/04/16 17:18:10 DISALLOW...
darin (slow to review) 2014/04/16 23:26:04 Thanks.
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_MOJO_MOJO_APPLICATION_H_

Powered by Google App Engine
This is Rietveld 408576698