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

Unified Diff: shell/application_manager/shell_impl.h

Issue 1450223002: Add an ApplicationConnector.Duplicate(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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: shell/application_manager/shell_impl.h
diff --git a/shell/application_manager/shell_impl.h b/shell/application_manager/shell_impl.h
index 2fc4846c07fe361375bb9e96a59fcbe9b3b871d5..0fa93ca6620e3739b320d45a4a433c010d68779c 100644
--- a/shell/application_manager/shell_impl.h
+++ b/shell/application_manager/shell_impl.h
@@ -45,21 +45,23 @@ class ShellImpl : public mojo::Shell {
base::Closure on_application_end() const { return on_application_end_; }
private:
+ // This is a per-|ShellImpl| singleton.
class ApplicationConnectorImpl : public mojo::ApplicationConnector {
public:
- explicit ApplicationConnectorImpl(mojo::Shell* shell) : shell_(shell) {}
- ~ApplicationConnectorImpl() override {}
+ explicit ApplicationConnectorImpl(mojo::Shell* shell);
+ ~ApplicationConnectorImpl() override;
void ConnectToApplication(
const mojo::String& app_url,
mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services) override {
- shell_->ConnectToApplication(app_url, services.Pass(),
- exposed_services.Pass());
- }
+ mojo::ServiceProviderPtr exposed_services) override;
+ void Duplicate(mojo::InterfaceRequest<mojo::ApplicationConnector>
+ application_connector_request) override;
private:
mojo::Shell* const shell_;
+ mojo::BindingSet<mojo::ApplicationConnector> bindings_;
+
DISALLOW_COPY_AND_ASSIGN(ApplicationConnectorImpl);
};
@@ -79,7 +81,6 @@ class ShellImpl : public mojo::Shell {
mojo::Binding<mojo::Shell> binding_;
ApplicationConnectorImpl application_connector_impl_;
- mojo::BindingSet<mojo::ApplicationConnector> application_connectors_;
DISALLOW_COPY_AND_ASSIGN(ShellImpl);
};
« no previous file with comments | « mojo/public/interfaces/application/application_connector.mojom ('k') | shell/application_manager/shell_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698