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 #include "mash/login/login.h" | 5 #include "mash/login/login.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "ash/public/interfaces/container.mojom.h" | 10 #include "ash/public/interfaces/container.mojom.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 47 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
48 params.delegate = ui; | 48 params.delegate = ui; |
49 | 49 |
50 std::map<std::string, std::vector<uint8_t>> properties; | 50 std::map<std::string, std::vector<uint8_t>> properties; |
51 properties[ash::mojom::kWindowContainer_Property] = | 51 properties[ash::mojom::kWindowContainer_Property] = |
52 mojo::ConvertTo<std::vector<uint8_t>>( | 52 mojo::ConvertTo<std::vector<uint8_t>>( |
53 static_cast<int32_t>(ash::mojom::Container::LOGIN_WINDOWS)); | 53 static_cast<int32_t>(ash::mojom::Container::LOGIN_WINDOWS)); |
54 ui::Window* window = | 54 ui::Window* window = |
55 views::WindowManagerConnection::Get()->NewWindow(properties); | 55 views::WindowManagerConnection::Get()->NewWindow(properties); |
56 params.native_widget = new views::NativeWidgetMus( | 56 params.native_widget = new views::NativeWidgetMus( |
57 widget, connector, window, ui::mojom::SurfaceType::DEFAULT); | 57 widget, window, ui::mojom::SurfaceType::DEFAULT); |
58 widget->Init(params); | 58 widget->Init(params); |
59 widget->Show(); | 59 widget->Show(); |
60 } | 60 } |
61 | 61 |
62 private: | 62 private: |
63 UI(Login* login, shell::Connector* connector) | 63 UI(Login* login, shell::Connector* connector) |
64 : login_(login), | 64 : login_(login), |
65 connector_(connector), | 65 connector_(connector), |
66 user_id_1_("00000000-0000-4000-8000-000000000000"), | 66 user_id_1_("00000000-0000-4000-8000-000000000000"), |
67 user_id_2_("00000000-0000-4000-8000-000000000001"), | 67 user_id_2_("00000000-0000-4000-8000-000000000001"), |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 } | 201 } |
202 | 202 |
203 } // namespace | 203 } // namespace |
204 | 204 |
205 shell::Service* CreateLogin() { | 205 shell::Service* CreateLogin() { |
206 return new Login; | 206 return new Login; |
207 } | 207 } |
208 | 208 |
209 } // namespace login | 209 } // namespace login |
210 } // namespace main | 210 } // namespace main |
OLD | NEW |