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 | 8 |
9 #include "base/guid.h" | 9 #include "base/guid.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 views::WindowManagerConnection::Create(connector); | 42 views::WindowManagerConnection::Create(connector); |
43 | 43 |
44 views::Widget* widget = new views::Widget; | 44 views::Widget* widget = new views::Widget; |
45 views::Widget::InitParams params( | 45 views::Widget::InitParams params( |
46 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 46 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
47 params.delegate = ui; | 47 params.delegate = ui; |
48 | 48 |
49 std::map<std::string, std::vector<uint8_t>> properties; | 49 std::map<std::string, std::vector<uint8_t>> properties; |
50 properties[mash::wm::mojom::kWindowContainer_Property] = | 50 properties[mash::wm::mojom::kWindowContainer_Property] = |
51 mojo::TypeConverter<const std::vector<uint8_t>, int32_t>::Convert( | 51 mojo::ConvertTo<std::vector<uint8_t>>( |
52 static_cast<int32_t>(mash::wm::mojom::Container::LOGIN_WINDOWS)); | 52 static_cast<int32_t>(mash::wm::mojom::Container::LOGIN_WINDOWS)); |
53 mus::Window* window = | 53 mus::Window* window = |
54 views::WindowManagerConnection::Get()->NewWindow(properties); | 54 views::WindowManagerConnection::Get()->NewWindow(properties); |
55 params.native_widget = new views::NativeWidgetMus( | 55 params.native_widget = new views::NativeWidgetMus( |
56 widget, connector, window, mus::mojom::SurfaceType::DEFAULT); | 56 widget, connector, window, mus::mojom::SurfaceType::DEFAULT); |
57 widget->Init(params); | 57 widget->Init(params); |
58 widget->Show(); | 58 widget->Show(); |
59 } | 59 } |
60 | 60 |
61 private: | 61 private: |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 } | 198 } |
199 | 199 |
200 } // namespace | 200 } // namespace |
201 | 201 |
202 mojo::ShellClient* CreateLogin() { | 202 mojo::ShellClient* CreateLogin() { |
203 return new Login; | 203 return new Login; |
204 } | 204 } |
205 | 205 |
206 } // namespace login | 206 } // namespace login |
207 } // namespace main | 207 } // namespace main |
OLD | NEW |