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

Side by Side Diff: ash/system/status_area_widget.cc

Issue 40053002: Implements the dialog view for logout button tray in public sessions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enhence tests; simplify code; fix win build(hope so) Created 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/status_area_widget.h" 5 #include "ash/system/status_area_widget.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
9 #include "ash/shelf/shelf_widget.h" 9 #include "ash/shelf/shelf_widget.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 system_tray_ = new SystemTray(this); 108 system_tray_ = new SystemTray(this);
109 status_area_widget_delegate_->AddTray(system_tray_); 109 status_area_widget_delegate_->AddTray(system_tray_);
110 } 110 }
111 111
112 void StatusAreaWidget::AddWebNotificationTray() { 112 void StatusAreaWidget::AddWebNotificationTray() {
113 web_notification_tray_ = new WebNotificationTray(this); 113 web_notification_tray_ = new WebNotificationTray(this);
114 status_area_widget_delegate_->AddTray(web_notification_tray_); 114 status_area_widget_delegate_->AddTray(web_notification_tray_);
115 } 115 }
116 116
117 void StatusAreaWidget::AddLogoutButtonTray() { 117 void StatusAreaWidget::AddLogoutButtonTray() {
118 logout_button_tray_ = new LogoutButtonTray(this); 118 logout_button_tray_ = new LogoutButtonTray(this, NULL);
119 status_area_widget_delegate_->AddTray(logout_button_tray_); 119 status_area_widget_delegate_->AddTray(logout_button_tray_);
120 } 120 }
121 121
122 void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) { 122 void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) {
123 status_area_widget_delegate_->set_alignment(alignment); 123 status_area_widget_delegate_->set_alignment(alignment);
124 if (system_tray_) 124 if (system_tray_)
125 system_tray_->SetShelfAlignment(alignment); 125 system_tray_->SetShelfAlignment(alignment);
126 if (web_notification_tray_) 126 if (web_notification_tray_)
127 web_notification_tray_->SetShelfAlignment(alignment); 127 web_notification_tray_->SetShelfAlignment(alignment);
128 if (logout_button_tray_) 128 if (logout_button_tray_)
(...skipping 14 matching lines...) Expand all
143 if (system_tray_) 143 if (system_tray_)
144 system_tray_->UpdateAfterLoginStatusChange(login_status); 144 system_tray_->UpdateAfterLoginStatusChange(login_status);
145 if (web_notification_tray_) 145 if (web_notification_tray_)
146 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); 146 web_notification_tray_->UpdateAfterLoginStatusChange(login_status);
147 if (logout_button_tray_) 147 if (logout_button_tray_)
148 logout_button_tray_->UpdateAfterLoginStatusChange(login_status); 148 logout_button_tray_->UpdateAfterLoginStatusChange(login_status);
149 } 149 }
150 150
151 } // namespace internal 151 } // namespace internal
152 } // namespace ash 152 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698