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

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

Issue 1810713002: Cascade shutdown of instances (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@55all_users
Patch Set: . Created 4 years, 9 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/public/interfaces/login.mojom ('k') | mash/quick_launch/quick_launch_application.h » ('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/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
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
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
OLDNEW
« no previous file with comments | « mash/login/public/interfaces/login.mojom ('k') | mash/quick_launch/quick_launch_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698