OLD | NEW |
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 MASH_INIT_INIT_H_ | 5 #ifndef MASH_INIT_INIT_H_ |
6 #define MASH_INIT_INIT_H_ | 6 #define MASH_INIT_INIT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 class Init : public mojo::ShellClient, | 25 class Init : public mojo::ShellClient, |
26 public mojom::Login, | 26 public mojom::Login, |
27 public mojo::InterfaceFactory<mojom::Login> { | 27 public mojo::InterfaceFactory<mojom::Login> { |
28 public: | 28 public: |
29 Init(); | 29 Init(); |
30 ~Init() override; | 30 ~Init() override; |
31 | 31 |
32 private: | 32 private: |
33 // mojo::ShellClient: | 33 // mojo::ShellClient: |
34 void Initialize(mojo::Connector* connector, const std::string& url, | 34 void Initialize(mojo::Connector* connector, const std::string& url, |
35 uint32_t id, uint32_t user_id) override; | 35 const std::string& user_id, uint32_t id) override; |
36 | 36 |
37 // mojom::Login: | 37 // mojom::Login: |
38 void LoginAs(uint32_t user_id) override; | 38 void LoginAs(const mojo::String& user_id) override; |
39 | 39 |
40 // mojo::InterfaceFactory<mojom::Login>: | 40 // mojo::InterfaceFactory<mojom::Login>: |
41 void Create(mojo::Connection* connection, | 41 void Create(mojo::Connection* connection, |
42 mojom::LoginRequest request) override; | 42 mojom::LoginRequest request) override; |
43 | 43 |
44 void StartWindowManager(); | 44 void StartWindowManager(); |
45 void StartLogin(); | 45 void StartLogin(); |
46 | 46 |
47 // Starts the application at |url|, running |restart_callback| if the | 47 // Starts the application at |url|, running |restart_callback| if the |
48 // connection to the application is closed. | 48 // connection to the application is closed. |
49 void StartRestartableService(mojo::Connector::ConnectParams* params, | 49 void StartRestartableService(mojo::Connector::ConnectParams* params, |
50 const base::Closure& restart_callback); | 50 const base::Closure& restart_callback); |
51 | 51 |
52 mojo::Connector* connector_; | 52 mojo::Connector* connector_; |
53 std::map<std::string, scoped_ptr<mojo::Connection>> connections_; | 53 std::map<std::string, scoped_ptr<mojo::Connection>> connections_; |
54 mojo::BindingSet<mojom::Login> login_bindings_; | 54 mojo::BindingSet<mojom::Login> login_bindings_; |
55 scoped_ptr<mojo::Connection> mus_connection_; | 55 scoped_ptr<mojo::Connection> mus_connection_; |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(Init); | 57 DISALLOW_COPY_AND_ASSIGN(Init); |
58 }; | 58 }; |
59 | 59 |
60 } // namespace init | 60 } // namespace init |
61 } // namespace mash | 61 } // namespace mash |
62 | 62 |
63 #endif // MASH_INIT_INIT_H_ | 63 #endif // MASH_INIT_INIT_H_ |
OLD | NEW |