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

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 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/session/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/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/constants.mojom.h" 17 #include "mash/init/public/interfaces/constants.mojom.h"
17 #include "mash/init/public/interfaces/init.mojom.h" 18 #include "mash/init/public/interfaces/init.mojom.h"
18 #include "mash/login/public/interfaces/login.mojom.h" 19 #include "mash/login/public/interfaces/login.mojom.h"
19 #include "mojo/public/cpp/bindings/binding_set.h" 20 #include "mojo/public/cpp/bindings/binding_set.h"
20 #include "services/service_manager/public/cpp/connector.h" 21 #include "services/service_manager/public/cpp/connector.h"
21 #include "services/service_manager/public/cpp/interface_factory.h" 22 #include "services/service_manager/public/cpp/interface_factory.h"
22 #include "services/service_manager/public/cpp/interface_registry.h" 23 #include "services/service_manager/public/cpp/interface_registry.h"
23 #include "services/service_manager/public/cpp/service.h" 24 #include "services/service_manager/public/cpp/service.h"
24 #include "services/service_manager/public/cpp/service_context.h" 25 #include "services/service_manager/public/cpp/service_context.h"
25 #include "services/tracing/public/cpp/provider.h" 26 #include "services/tracing/public/cpp/provider.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 login_button_1_->SetBounds(button_box.x(), button_box.y(), ps1.width(), 111 login_button_1_->SetBounds(button_box.x(), button_box.y(), ps1.width(),
111 ps1.height()); 112 ps1.height());
112 login_button_2_->SetBounds(login_button_1_->bounds().right() + 10, 113 login_button_2_->SetBounds(login_button_1_->bounds().right() + 10,
113 button_box.y(), ps2.width(), ps2.height()); 114 button_box.y(), ps2.width(), ps2.height());
114 } 115 }
115 116
116 // Overridden from views::ButtonListener: 117 // Overridden from views::ButtonListener:
117 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 118 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
118 119
119 void StartWindowManager(const service_manager::Identity& identity) { 120 void StartWindowManager(const service_manager::Identity& identity) {
120 mash_wm_connection_ = connector_->Connect("ash"); 121 mash_wm_connection_ =
122 connector_->Connect(common::GetWindowManagerServiceName());
121 mash_wm_connection_->SetConnectionLostClosure( 123 mash_wm_connection_->SetConnectionLostClosure(
122 base::Bind(&UI::StartWindowManager, base::Unretained(this), identity)); 124 base::Bind(&UI::StartWindowManager, base::Unretained(this), identity));
123 window_manager_connection_ = 125 window_manager_connection_ =
124 views::WindowManagerConnection::Create(connector_, identity); 126 views::WindowManagerConnection::Create(connector_, identity);
125 } 127 }
126 128
127 Login* login_; 129 Login* login_;
128 service_manager::Connector* connector_; 130 service_manager::Connector* connector_;
129 const std::string user_id_1_; 131 const std::string user_id_1_;
130 const std::string user_id_2_; 132 const std::string user_id_2_;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 210 }
209 211
210 } // namespace 212 } // namespace
211 213
212 service_manager::Service* CreateLogin() { 214 service_manager::Service* CreateLogin() {
213 return new Login; 215 return new Login;
214 } 216 }
215 217
216 } // namespace login 218 } // namespace login
217 } // namespace main 219 } // namespace main
OLDNEW
« no previous file with comments | « mash/login/BUILD.gn ('k') | mash/session/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698