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

Side by Side Diff: mash/login/login.h

Issue 1801133002: Restructure login (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « mash/login/BUILD.gn ('k') | mash/login/login.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 MASH_LOGIN_LOGIN_H_ 5 #ifndef MASH_LOGIN_LOGIN_H_
6 #define MASH_LOGIN_LOGIN_H_ 6 #define MASH_LOGIN_LOGIN_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "mash/init/public/interfaces/login.mojom.h" 12 #include "mash/init/public/interfaces/init.mojom.h"
13 #include "mash/login/public/interfaces/login.mojom.h"
13 #include "mojo/services/tracing/public/cpp/tracing_impl.h" 14 #include "mojo/services/tracing/public/cpp/tracing_impl.h"
14 #include "mojo/shell/public/cpp/shell_client.h" 15 #include "mojo/shell/public/cpp/shell_client.h"
15 16
16 namespace views { 17 namespace views {
17 class AuraInit; 18 class AuraInit;
18 } 19 }
19 20
20 namespace mash { 21 namespace mash {
21 namespace login { 22 namespace login {
22 23
23 class Login : public mojo::ShellClient { 24 class LoginController : public mojo::ShellClient,
25 public mojo::InterfaceFactory<mojom::Login> {
24 public: 26 public:
25 Login(); 27 LoginController();
26 ~Login() override; 28 ~LoginController() override;
27 29
28 init::mojom::Login* login() { return login_.get(); } 30 init::mojom::Init* init() { return init_.get(); }
31 const std::string& login_user_id() const { return login_user_id_; }
29 32
30 private: 33 private:
31 // mojo::ShellClient: 34 // mojo::ShellClient:
32 void Initialize(mojo::Connector* connector, const mojo::Identity& identity, 35 void Initialize(mojo::Connector* connector, const mojo::Identity& identity,
33 uint32_t id) override; 36 uint32_t id) override;
34 bool AcceptConnection(mojo::Connection* connection) override; 37 bool AcceptConnection(mojo::Connection* connection) override;
35 38
39 // mojo::InterfaceFactory<mojom::Login>:
40 void Create(mojo::Connection* connection,
41 mojom::LoginRequest request) override;
42
43 mojo::Connector* connector_;
44 std::string login_user_id_;
36 mojo::TracingImpl tracing_; 45 mojo::TracingImpl tracing_;
37 scoped_ptr<views::AuraInit> aura_init_; 46 scoped_ptr<views::AuraInit> aura_init_;
38 init::mojom::LoginPtr login_; 47 init::mojom::InitPtr init_;
39 48
40 DISALLOW_COPY_AND_ASSIGN(Login); 49 DISALLOW_COPY_AND_ASSIGN(LoginController);
41 }; 50 };
42 51
43 } // namespace login 52 } // namespace login
44 } // namespace mash 53 } // namespace mash
45 54
46 #endif // MASH_LOGIN_LOGIN_H_ 55 #endif // MASH_LOGIN_LOGIN_H_
OLDNEW
« no previous file with comments | « mash/login/BUILD.gn ('k') | mash/login/login.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698