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

Unified Diff: trunk/src/content/child/mojo/mojo_application.h

Issue 352013002: Revert 279557 "Support exposing Mojo services between render fra..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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 | « trunk/src/content/child/child_thread.cc ('k') | trunk/src/content/child/mojo/mojo_application.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/content/child/mojo/mojo_application.h
===================================================================
--- trunk/src/content/child/mojo/mojo_application.h (revision 279559)
+++ trunk/src/content/child/mojo/mojo_application.h (working copy)
@@ -5,9 +5,9 @@
#ifndef CONTENT_CHILD_MOJO_MOJO_APPLICATION_H_
#define CONTENT_CHILD_MOJO_MOJO_APPLICATION_H_
-#include "content/common/mojo/service_registry_impl.h"
#include "ipc/ipc_platform_file.h"
#include "mojo/embedder/channel_init.h"
+#include "mojo/public/interfaces/service_provider/service_provider.mojom.h"
namespace IPC {
class Message;
@@ -18,23 +18,28 @@
// MojoApplication represents the code needed to setup a child process as a
// Mojo application via Chrome IPC. Instantiate MojoApplication and call its
// OnMessageReceived method to give it a shot at handling Chrome IPC messages.
-// It makes the ServiceRegistry interface available.
+// It makes the mojo::Shell interface available and calls methods on the given
+// mojo::ShellClient interface as calls come in.
class MojoApplication {
public:
- MojoApplication();
- virtual ~MojoApplication();
+ // The ShellClient pointer must remain valid for the lifetime of the
+ // MojoApplication instance.
+ explicit MojoApplication(mojo::ServiceProvider* service_provider);
+ ~MojoApplication();
bool OnMessageReceived(const IPC::Message& msg);
- ServiceRegistry* service_registry() { return &service_registry_; }
+ mojo::ServiceProvider* host_service_provider() {
+ return host_service_provider_.get();
+ }
private:
void OnActivate(const IPC::PlatformFileForTransit& file);
mojo::embedder::ChannelInit channel_init_;
+ mojo::ServiceProviderPtr host_service_provider_;
+ mojo::ServiceProvider* service_provider_;
- ServiceRegistryImpl service_registry_;
-
DISALLOW_COPY_AND_ASSIGN(MojoApplication);
};
« no previous file with comments | « trunk/src/content/child/child_thread.cc ('k') | trunk/src/content/child/mojo/mojo_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698