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

Unified Diff: mojo/shell/public/cpp/lib/connector_impl.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/shell/public/cpp/lib/connection_impl.cc ('k') | mojo/shell/public/cpp/lib/connector_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/lib/connector_impl.h
diff --git a/mojo/shell/public/cpp/lib/connector_impl.h b/mojo/shell/public/cpp/lib/connector_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..97829323ea4ea40cc90f3d7a87b19bdcfe63bbad
--- /dev/null
+++ b/mojo/shell/public/cpp/lib/connector_impl.h
@@ -0,0 +1,35 @@
+// Copyright 2016 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 MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
+#define MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
+
+#include "base/threading/thread_checker.h"
+#include "mojo/shell/public/cpp/connector.h"
+#include "mojo/shell/public/interfaces/shell.mojom.h"
+
+namespace mojo {
+
+class ConnectorImpl : public Connector {
+ public:
+ explicit ConnectorImpl(shell::mojom::ConnectorPtrInfo unbound_state);
+ ~ConnectorImpl();
+
+ private:
+ // Connector:
+ scoped_ptr<Connection> Connect(const std::string& url) override;
+ scoped_ptr<Connection> Connect(ConnectParams* params) override;
+ scoped_ptr<Connector> Clone() override;
+
+ shell::mojom::ConnectorPtrInfo unbound_state_;
+ shell::mojom::ConnectorPtr connector_;
+
+ scoped_ptr<base::ThreadChecker> thread_checker_;
+
+ DISALLOW_COPY_AND_ASSIGN(ConnectorImpl);
+};
+
+} // namespace mojo
+
+#endif // MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
« no previous file with comments | « mojo/shell/public/cpp/lib/connection_impl.cc ('k') | mojo/shell/public/cpp/lib/connector_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698