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

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

Issue 2024313002: Moves mash/wm/public -> ash/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 6 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/screenlock/BUILD.gn » ('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 #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 "base/guid.h" 11 #include "base/guid.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
13 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
14 #include "components/mus/public/cpp/property_type_converters.h" 15 #include "components/mus/public/cpp/property_type_converters.h"
15 #include "components/mus/public/interfaces/user_access_manager.mojom.h" 16 #include "components/mus/public/interfaces/user_access_manager.mojom.h"
16 #include "mash/init/public/interfaces/init.mojom.h" 17 #include "mash/init/public/interfaces/init.mojom.h"
17 #include "mash/login/public/interfaces/login.mojom.h" 18 #include "mash/login/public/interfaces/login.mojom.h"
18 #include "mash/wm/public/interfaces/container.mojom.h"
19 #include "mojo/public/cpp/bindings/binding_set.h" 19 #include "mojo/public/cpp/bindings/binding_set.h"
20 #include "services/shell/public/cpp/connector.h" 20 #include "services/shell/public/cpp/connector.h"
21 #include "services/shell/public/cpp/shell_client.h" 21 #include "services/shell/public/cpp/shell_client.h"
22 #include "services/tracing/public/cpp/tracing_impl.h" 22 #include "services/tracing/public/cpp/tracing_impl.h"
23 #include "ui/views/background.h" 23 #include "ui/views/background.h"
24 #include "ui/views/controls/button/label_button.h" 24 #include "ui/views/controls/button/label_button.h"
25 #include "ui/views/mus/aura_init.h" 25 #include "ui/views/mus/aura_init.h"
26 #include "ui/views/mus/native_widget_mus.h" 26 #include "ui/views/mus/native_widget_mus.h"
27 #include "ui/views/mus/window_manager_connection.h" 27 #include "ui/views/mus/window_manager_connection.h"
28 #include "ui/views/widget/widget_delegate.h" 28 #include "ui/views/widget/widget_delegate.h"
(...skipping 14 matching lines...) Expand all
43 ui->StartWindowManager(); 43 ui->StartWindowManager();
44 44
45 views::WindowManagerConnection::Create(connector, identity); 45 views::WindowManagerConnection::Create(connector, identity);
46 46
47 views::Widget* widget = new views::Widget; 47 views::Widget* widget = new views::Widget;
48 views::Widget::InitParams params( 48 views::Widget::InitParams params(
49 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 49 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
50 params.delegate = ui; 50 params.delegate = ui;
51 51
52 std::map<std::string, std::vector<uint8_t>> properties; 52 std::map<std::string, std::vector<uint8_t>> properties;
53 properties[mash::wm::mojom::kWindowContainer_Property] = 53 properties[ash::mojom::kWindowContainer_Property] =
54 mojo::ConvertTo<std::vector<uint8_t>>( 54 mojo::ConvertTo<std::vector<uint8_t>>(
55 static_cast<int32_t>(mash::wm::mojom::Container::LOGIN_WINDOWS)); 55 static_cast<int32_t>(ash::mojom::Container::LOGIN_WINDOWS));
56 mus::Window* window = 56 mus::Window* window =
57 views::WindowManagerConnection::Get()->NewWindow(properties); 57 views::WindowManagerConnection::Get()->NewWindow(properties);
58 params.native_widget = new views::NativeWidgetMus( 58 params.native_widget = new views::NativeWidgetMus(
59 widget, connector, window, mus::mojom::SurfaceType::DEFAULT); 59 widget, connector, window, mus::mojom::SurfaceType::DEFAULT);
60 widget->Init(params); 60 widget->Init(params);
61 widget->Show(); 61 widget->Show();
62 } 62 }
63 63
64 private: 64 private:
65 UI(Login* login, shell::Connector* connector) 65 UI(Login* login, shell::Connector* connector)
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } 200 }
201 201
202 } // namespace 202 } // namespace
203 203
204 shell::ShellClient* CreateLogin() { 204 shell::ShellClient* CreateLogin() {
205 return new Login; 205 return new Login;
206 } 206 }
207 207
208 } // namespace login 208 } // namespace login
209 } // namespace main 209 } // namespace main
OLDNEW
« no previous file with comments | « mash/login/BUILD.gn ('k') | mash/screenlock/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698