OLD | NEW |
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/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_delegate.h" | 9 #include "ash/shell_delegate.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 } | 328 } |
329 | 329 |
330 void StatusAreaWidget::AddWebNotificationTray( | 330 void StatusAreaWidget::AddWebNotificationTray( |
331 WebNotificationTray* web_notification_tray) { | 331 WebNotificationTray* web_notification_tray) { |
332 web_notification_tray_ = web_notification_tray; | 332 web_notification_tray_ = web_notification_tray; |
333 widget_delegate_->AddTray(web_notification_tray); | 333 widget_delegate_->AddTray(web_notification_tray); |
334 } | 334 } |
335 | 335 |
336 void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) { | 336 void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) { |
337 widget_delegate_->set_alignment(alignment); | 337 widget_delegate_->set_alignment(alignment); |
338 widget_delegate_->UpdateLayout(); | |
339 if (system_tray_) | 338 if (system_tray_) |
340 system_tray_->SetShelfAlignment(alignment); | 339 system_tray_->SetShelfAlignment(alignment); |
341 if (web_notification_tray_) | 340 if (web_notification_tray_) |
342 web_notification_tray_->SetShelfAlignment(alignment); | 341 web_notification_tray_->SetShelfAlignment(alignment); |
| 342 widget_delegate_->UpdateLayout(); |
343 } | 343 } |
344 | 344 |
345 void StatusAreaWidget::SetPaintsBackground( | 345 void StatusAreaWidget::SetPaintsBackground( |
346 bool value, | 346 bool value, |
347 internal::BackgroundAnimator::ChangeType change_type) { | 347 internal::BackgroundAnimator::ChangeType change_type) { |
348 if (system_tray_) | 348 if (system_tray_) |
349 system_tray_->SetPaintsBackground(value, change_type); | 349 system_tray_->SetPaintsBackground(value, change_type); |
350 if (web_notification_tray_) | 350 if (web_notification_tray_) |
351 web_notification_tray_->SetPaintsBackground(value, change_type); | 351 web_notification_tray_->SetPaintsBackground(value, change_type); |
352 } | 352 } |
(...skipping 25 matching lines...) Expand all Loading... |
378 user::LoginStatus login_status) { | 378 user::LoginStatus login_status) { |
379 login_status_ = login_status; | 379 login_status_ = login_status; |
380 if (system_tray_) | 380 if (system_tray_) |
381 system_tray_->UpdateAfterLoginStatusChange(login_status); | 381 system_tray_->UpdateAfterLoginStatusChange(login_status); |
382 if (web_notification_tray_) | 382 if (web_notification_tray_) |
383 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); | 383 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); |
384 } | 384 } |
385 | 385 |
386 } // namespace internal | 386 } // namespace internal |
387 } // namespace ash | 387 } // namespace ash |
OLD | NEW |