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

Unified Diff: services/shell/public/cpp/shell_connection.h

Issue 2111353002: Move content's shell connections to the IO thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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
Index: services/shell/public/cpp/shell_connection.h
diff --git a/services/shell/public/cpp/shell_connection.h b/services/shell/public/cpp/shell_connection.h
index 59ed8f2bb944eb43403c0af7c7fccb648b550e9b..458d22dc894ed8db5326efb93a2d9dbf28fa99d3 100644
--- a/services/shell/public/cpp/shell_connection.h
+++ b/services/shell/public/cpp/shell_connection.h
@@ -11,9 +11,9 @@
#include "base/callback.h"
#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/system/core.h"
+#include "services/shell/public/cpp/connector.h"
#include "services/shell/public/cpp/shell_client.h"
#include "services/shell/public/interfaces/connector.mojom.h"
#include "services/shell/public/interfaces/shell_client.mojom.h"
@@ -46,9 +46,13 @@ class ShellConnection : public mojom::ShellClient {
// Creates a new ShellConnection bound to |request|. This connection may be
// used immediately to make outgoing connections via connector(). Does not
// take ownership of |client|, which must remain valid for the lifetime of
- // ShellConnection.
+ // ShellConnection. If either |connector| or |connector_request| is non-null
+ // both must be non-null. If both are null, the connection will create its own
+ // Connector and request to pass to the shell on initialization.
ShellConnection(shell::ShellClient* client,
- mojom::ShellClientRequest request);
+ mojom::ShellClientRequest request,
+ std::unique_ptr<Connector> connector = nullptr,
+ mojom::ConnectorRequest connector_request = nullptr);
~ShellConnection() override;
@@ -85,7 +89,7 @@ class ShellConnection : public mojom::ShellClient {
// We track the lifetime of incoming connection registries as it more
// convenient for the client.
- ScopedVector<Connection> incoming_connections_;
+ std::vector<std::unique_ptr<Connection>> incoming_connections_;
// A pending Connector request which will eventually be passed to the shell.
mojom::ConnectorRequest pending_connector_request_;
« content/gpu/gpu_child_thread.cc ('K') | « services/shell/public/cpp/lib/shell_connection.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698