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/ui.h" | 5 #include "mash/login/ui.h" |
6 | 6 |
7 #include "base/guid.h" | 7 #include "base/guid.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "components/mus/public/cpp/property_type_converters.h" | 9 #include "components/mus/public/cpp/property_type_converters.h" |
10 #include "mash/login/login.h" | 10 #include "mash/login/login.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 login_button_1_->SetStyle(views::Button::STYLE_BUTTON); | 72 login_button_1_->SetStyle(views::Button::STYLE_BUTTON); |
73 login_button_2_->SetStyle(views::Button::STYLE_BUTTON); | 73 login_button_2_->SetStyle(views::Button::STYLE_BUTTON); |
74 AddChildView(login_button_1_); | 74 AddChildView(login_button_1_); |
75 AddChildView(login_button_2_); | 75 AddChildView(login_button_2_); |
76 } | 76 } |
77 | 77 |
78 UI::~UI() { | 78 UI::~UI() { |
79 // Prevent the window manager from restarting during graceful shutdown. | 79 // Prevent the window manager from restarting during graceful shutdown. |
80 window_manager_connection_->SetConnectionLostClosure(base::Closure()); | 80 window_manager_connection_->SetConnectionLostClosure(base::Closure()); |
81 is_showing_ = false; | 81 is_showing_ = false; |
| 82 // TODO(beng): we should be terminating this app at this point. |
82 } | 83 } |
83 | 84 |
84 views::View* UI::GetContentsView() { return this; } | 85 views::View* UI::GetContentsView() { return this; } |
85 | 86 |
86 base::string16 UI::GetWindowTitle() const { | 87 base::string16 UI::GetWindowTitle() const { |
87 // TODO(beng): use resources. | 88 // TODO(beng): use resources. |
88 return base::ASCIIToUTF16("Login"); | 89 return base::ASCIIToUTF16("Login"); |
89 } | 90 } |
90 | 91 |
91 void UI::DeleteDelegate() { | 92 void UI::DeleteDelegate() { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 } | 127 } |
127 | 128 |
128 void UI::StartWindowManager() { | 129 void UI::StartWindowManager() { |
129 window_manager_connection_ = connector_->Connect("mojo:desktop_wm"); | 130 window_manager_connection_ = connector_->Connect("mojo:desktop_wm"); |
130 window_manager_connection_->SetConnectionLostClosure( | 131 window_manager_connection_->SetConnectionLostClosure( |
131 base::Bind(&UI::StartWindowManager, base::Unretained(this))); | 132 base::Bind(&UI::StartWindowManager, base::Unretained(this))); |
132 } | 133 } |
133 | 134 |
134 } // namespace login | 135 } // namespace login |
135 } // namespace mash | 136 } // namespace mash |
OLD | NEW |