| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 AddChildView(login_button_1_); | 73 AddChildView(login_button_1_); |
| 74 AddChildView(login_button_2_); | 74 AddChildView(login_button_2_); |
| 75 } | 75 } |
| 76 ~UI() override { | 76 ~UI() override { |
| 77 // Prevent the window manager from restarting during graceful shutdown. | 77 // Prevent the window manager from restarting during graceful shutdown. |
| 78 mash_wm_connection_->SetConnectionLostClosure(base::Closure()); | 78 mash_wm_connection_->SetConnectionLostClosure(base::Closure()); |
| 79 base::MessageLoop::current()->QuitWhenIdle(); | 79 base::MessageLoop::current()->QuitWhenIdle(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 // Overridden from views::WidgetDelegate: | 82 // Overridden from views::WidgetDelegate: |
| 83 views::View* GetContentsView() override { return this; } | |
| 84 base::string16 GetWindowTitle() const override { | 83 base::string16 GetWindowTitle() const override { |
| 85 // TODO(beng): use resources. | 84 // TODO(beng): use resources. |
| 86 return base::ASCIIToUTF16("Login"); | 85 return base::ASCIIToUTF16("Login"); |
| 87 } | 86 } |
| 88 void DeleteDelegate() override { delete this; } | 87 void DeleteDelegate() override { delete this; } |
| 89 | 88 |
| 90 // Overridden from views::View: | 89 // Overridden from views::View: |
| 91 void Layout() override { | 90 void Layout() override { |
| 92 gfx::Rect button_box = GetLocalBounds(); | 91 gfx::Rect button_box = GetLocalBounds(); |
| 93 button_box.Inset(10, 10); | 92 button_box.Inset(10, 10); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 } | 199 } |
| 201 | 200 |
| 202 } // namespace | 201 } // namespace |
| 203 | 202 |
| 204 shell::Service* CreateLogin() { | 203 shell::Service* CreateLogin() { |
| 205 return new Login; | 204 return new Login; |
| 206 } | 205 } |
| 207 | 206 |
| 208 } // namespace login | 207 } // namespace login |
| 209 } // namespace main | 208 } // namespace main |
| OLD | NEW |