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

Side by Side Diff: ash/system/chromeos/session/logout_button_tray.cc

Issue 1914093002: Refactors DockedWindowLayoutManager in terms of ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nuke_aura_window
Patch Set: comment Created 4 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ash/system/chromeos/session/logout_button_tray.h" 5 #include "ash/system/chromeos/session/logout_button_tray.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/shelf/shelf_types.h" 10 #include "ash/shelf/shelf_types.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 tray_container()->AddChildView(button_); 103 tray_container()->AddChildView(button_);
104 tray_container()->SetBorder(views::Border::NullBorder()); 104 tray_container()->SetBorder(views::Border::NullBorder());
105 Shell::GetInstance()->system_tray_notifier()->AddLogoutButtonObserver(this); 105 Shell::GetInstance()->system_tray_notifier()->AddLogoutButtonObserver(this);
106 } 106 }
107 107
108 LogoutButtonTray::~LogoutButtonTray() { 108 LogoutButtonTray::~LogoutButtonTray() {
109 Shell::GetInstance()->system_tray_notifier()-> 109 Shell::GetInstance()->system_tray_notifier()->
110 RemoveLogoutButtonObserver(this); 110 RemoveLogoutButtonObserver(this);
111 } 111 }
112 112
113 void LogoutButtonTray::SetShelfAlignment(ShelfAlignment alignment) { 113 void LogoutButtonTray::SetShelfAlignment(wm::ShelfAlignment alignment) {
114 TrayBackgroundView::SetShelfAlignment(alignment); 114 TrayBackgroundView::SetShelfAlignment(alignment);
115 tray_container()->SetBorder(views::Border::NullBorder()); 115 tray_container()->SetBorder(views::Border::NullBorder());
116 } 116 }
117 117
118 base::string16 LogoutButtonTray::GetAccessibleNameForTray() { 118 base::string16 LogoutButtonTray::GetAccessibleNameForTray() {
119 return button_->GetText(); 119 return button_->GetText();
120 } 120 }
121 121
122 void LogoutButtonTray::HideBubbleWithView( 122 void LogoutButtonTray::HideBubbleWithView(
123 const views::TrayBubbleView* bubble_view) { 123 const views::TrayBubbleView* bubble_view) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 UpdateVisibility(); 158 UpdateVisibility();
159 } 159 }
160 160
161 void LogoutButtonTray::UpdateVisibility() { 161 void LogoutButtonTray::UpdateVisibility() {
162 SetVisible(show_logout_button_in_tray_ && 162 SetVisible(show_logout_button_in_tray_ &&
163 login_status_ != user::LOGGED_IN_NONE && 163 login_status_ != user::LOGGED_IN_NONE &&
164 login_status_ != user::LOGGED_IN_LOCKED); 164 login_status_ != user::LOGGED_IN_LOCKED);
165 } 165 }
166 166
167 } // namespace ash 167 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/session/logout_button_tray.h ('k') | ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698