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

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

Issue 2511233002: Add the beginning of a simple window manager that we'll support on Windows. (Closed)
Patch Set: . Created 4 years, 1 month 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
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/cpp/shell_window_ids.h" 10 #include "ash/public/cpp/shell_window_ids.h"
11 #include "base/guid.h" 11 #include "base/guid.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "mash/common/config.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 "mojo/public/cpp/bindings/binding_set.h" 19 #include "mojo/public/cpp/bindings/binding_set.h"
19 #include "services/service_manager/public/cpp/connector.h" 20 #include "services/service_manager/public/cpp/connector.h"
20 #include "services/service_manager/public/cpp/interface_factory.h" 21 #include "services/service_manager/public/cpp/interface_factory.h"
21 #include "services/service_manager/public/cpp/interface_registry.h" 22 #include "services/service_manager/public/cpp/interface_registry.h"
22 #include "services/service_manager/public/cpp/service.h" 23 #include "services/service_manager/public/cpp/service.h"
23 #include "services/service_manager/public/cpp/service_context.h" 24 #include "services/service_manager/public/cpp/service_context.h"
24 #include "services/tracing/public/cpp/provider.h" 25 #include "services/tracing/public/cpp/provider.h"
25 #include "services/ui/public/cpp/property_type_converters.h" 26 #include "services/ui/public/cpp/property_type_converters.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 login_button_1_->SetBounds(button_box.x(), button_box.y(), ps1.width(), 110 login_button_1_->SetBounds(button_box.x(), button_box.y(), ps1.width(),
110 ps1.height()); 111 ps1.height());
111 login_button_2_->SetBounds(login_button_1_->bounds().right() + 10, 112 login_button_2_->SetBounds(login_button_1_->bounds().right() + 10,
112 button_box.y(), ps2.width(), ps2.height()); 113 button_box.y(), ps2.width(), ps2.height());
113 } 114 }
114 115
115 // Overridden from views::ButtonListener: 116 // Overridden from views::ButtonListener:
116 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 117 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
117 118
118 void StartWindowManager(const service_manager::Identity& identity) { 119 void StartWindowManager(const service_manager::Identity& identity) {
119 mash_wm_connection_ = connector_->Connect("ash"); 120 mash_wm_connection_ =
121 connector_->Connect(common::GetWindowManagerServiceName());
120 mash_wm_connection_->SetConnectionLostClosure( 122 mash_wm_connection_->SetConnectionLostClosure(
121 base::Bind(&UI::StartWindowManager, base::Unretained(this), identity)); 123 base::Bind(&UI::StartWindowManager, base::Unretained(this), identity));
122 window_manager_connection_ = 124 window_manager_connection_ =
123 views::WindowManagerConnection::Create(connector_, identity); 125 views::WindowManagerConnection::Create(connector_, identity);
124 } 126 }
125 127
126 Login* login_; 128 Login* login_;
127 service_manager::Connector* connector_; 129 service_manager::Connector* connector_;
128 const std::string user_id_1_; 130 const std::string user_id_1_;
129 const std::string user_id_2_; 131 const std::string user_id_2_;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } 208 }
207 209
208 } // namespace 210 } // namespace
209 211
210 service_manager::Service* CreateLogin() { 212 service_manager::Service* CreateLogin() {
211 return new Login; 213 return new Login;
212 } 214 }
213 215
214 } // namespace login 216 } // namespace login
215 } // namespace main 217 } // namespace main
OLDNEW
« no previous file with comments | « mash/login/BUILD.gn ('k') | mash/session/BUILD.gn » ('j') | mash/wm/wm.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698