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

Unified Diff: mojo/shell/application_instance.h

Issue 1728083002: Extract a Connector interface from Shell that can be cloned & passed to other threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@12uid
Patch Set: . Created 4 years, 10 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 | « mojo/mojo_base.gyp ('k') | mojo/shell/application_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/application_instance.h
diff --git a/mojo/shell/application_instance.h b/mojo/shell/application_instance.h
index 418640e6d6e13d9c15c9b48a4dc02a54227628e1..fb4d046eab4abd87944b659334e36c732e9556d2 100644
--- a/mojo/shell/application_instance.h
+++ b/mojo/shell/application_instance.h
@@ -14,6 +14,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/process/process_handle.h"
#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/bindings/weak_binding_set.h"
#include "mojo/shell/capability_filter.h"
#include "mojo/shell/connect_params.h"
#include "mojo/shell/identity.h"
@@ -31,6 +32,7 @@ class NativeRunner;
// Encapsulates a connection to an instance of an application, tracked by the
// shell's ApplicationManager.
class ApplicationInstance : public mojom::Shell,
+ public mojom::Connector,
public mojom::PIDReceiver {
public:
ApplicationInstance(
@@ -56,13 +58,17 @@ class ApplicationInstance : public mojom::Shell,
private:
// Shell implementation:
+ void GetConnector(mojom::ConnectorRequest request) override;
+ void QuitApplication() override;
+
+ // Connector implementation:
void Connect(const String& app_url,
uint32_t user_id,
shell::mojom::InterfaceProviderRequest remote_interfaces,
shell::mojom::InterfaceProviderPtr local_interfaces,
mojom::CapabilityFilterPtr filter,
const ConnectCallback& callback) override;
- void QuitApplication() override;
+ void Clone(mojom::ConnectorRequest request) override;
// PIDReceiver implementation:
void SetPID(uint32_t pid) override;
@@ -87,6 +93,7 @@ class ApplicationInstance : public mojom::Shell,
mojom::ShellClientPtr shell_client_;
Binding<mojom::Shell> binding_;
Binding<mojom::PIDReceiver> pid_receiver_binding_;
+ WeakBindingSet<mojom::Connector> connectors_;
bool queue_requests_;
std::vector<ConnectParams*> queued_client_requests_;
NativeRunner* native_runner_;
« no previous file with comments | « mojo/mojo_base.gyp ('k') | mojo/shell/application_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698