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

Side by Side Diff: mojo/shell/public/cpp/lib/connector_impl.h

Issue 1736663003: Eliminate Quit() from Shell, and roll Shell & Connector together. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@14cf
Patch Set: . Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ 5 #ifndef MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
6 #define MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ 6 #define MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
7 7
8 #include "base/callback.h"
8 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
9 #include "mojo/shell/public/cpp/connector.h" 10 #include "mojo/shell/public/cpp/connector.h"
10 #include "mojo/shell/public/interfaces/shell.mojom.h" 11 #include "mojo/shell/public/interfaces/shell.mojom.h"
11 12
12 namespace mojo { 13 namespace mojo {
13 14
14 class ConnectorImpl : public Connector { 15 class ConnectorImpl : public Connector {
15 public: 16 public:
16 explicit ConnectorImpl(shell::mojom::ConnectorPtrInfo unbound_state); 17 explicit ConnectorImpl(shell::mojom::ConnectorPtrInfo unbound_state);
17 ~ConnectorImpl(); 18 ConnectorImpl(shell::mojom::ConnectorPtr connector,
19 const base::Closure& connection_error_closure);
20 ~ConnectorImpl() override;
18 21
19 private: 22 private:
20 // Connector: 23 // Connector:
21 scoped_ptr<Connection> Connect(const std::string& url) override; 24 scoped_ptr<Connection> Connect(const std::string& url) override;
22 scoped_ptr<Connection> Connect(ConnectParams* params) override; 25 scoped_ptr<Connection> Connect(ConnectParams* params) override;
23 scoped_ptr<Connector> Clone() override; 26 scoped_ptr<Connector> Clone() override;
24 27
25 shell::mojom::ConnectorPtrInfo unbound_state_; 28 shell::mojom::ConnectorPtrInfo unbound_state_;
26 shell::mojom::ConnectorPtr connector_; 29 shell::mojom::ConnectorPtr connector_;
27 30
28 scoped_ptr<base::ThreadChecker> thread_checker_; 31 scoped_ptr<base::ThreadChecker> thread_checker_;
29 32
30 DISALLOW_COPY_AND_ASSIGN(ConnectorImpl); 33 DISALLOW_COPY_AND_ASSIGN(ConnectorImpl);
31 }; 34 };
32 35
33 } // namespace mojo 36 } // namespace mojo
34 37
35 #endif // MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_ 38 #endif // MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/lib/application_test_base.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