| 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 } | 327 } |
| 328 | 328 |
| 329 void StatusAreaWidget::AddWebNotificationTray( | 329 void StatusAreaWidget::AddWebNotificationTray( |
| 330 WebNotificationTray* web_notification_tray) { | 330 WebNotificationTray* web_notification_tray) { |
| 331 web_notification_tray_ = web_notification_tray; | 331 web_notification_tray_ = web_notification_tray; |
| 332 widget_delegate_->AddTray(web_notification_tray); | 332 widget_delegate_->AddTray(web_notification_tray); |
| 333 } | 333 } |
| 334 | 334 |
| 335 void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) { | 335 void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) { |
| 336 widget_delegate_->set_alignment(alignment); | 336 widget_delegate_->set_alignment(alignment); |
| 337 widget_delegate_->UpdateLayout(); | |
| 338 if (system_tray_) | 337 if (system_tray_) |
| 339 system_tray_->SetShelfAlignment(alignment); | 338 system_tray_->SetShelfAlignment(alignment); |
| 340 if (web_notification_tray_) | 339 if (web_notification_tray_) |
| 341 web_notification_tray_->SetShelfAlignment(alignment); | 340 web_notification_tray_->SetShelfAlignment(alignment); |
| 341 widget_delegate_->UpdateLayout(); |
| 342 } | 342 } |
| 343 | 343 |
| 344 void StatusAreaWidget::SetPaintsBackground( | 344 void StatusAreaWidget::SetPaintsBackground( |
| 345 bool value, | 345 bool value, |
| 346 internal::BackgroundAnimator::ChangeType change_type) { | 346 internal::BackgroundAnimator::ChangeType change_type) { |
| 347 if (system_tray_) | 347 if (system_tray_) |
| 348 system_tray_->SetPaintsBackground(value, change_type); | 348 system_tray_->SetPaintsBackground(value, change_type); |
| 349 if (web_notification_tray_) | 349 if (web_notification_tray_) |
| 350 web_notification_tray_->SetPaintsBackground(value, change_type); | 350 web_notification_tray_->SetPaintsBackground(value, change_type); |
| 351 } | 351 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 368 void StatusAreaWidget::HideWebNotificationBubble() { | 368 void StatusAreaWidget::HideWebNotificationBubble() { |
| 369 DCHECK(web_notification_tray_); | 369 DCHECK(web_notification_tray_); |
| 370 web_notification_tray_->HideBubble(); | 370 web_notification_tray_->HideBubble(); |
| 371 // Show any hidden or suppressed system notifications. | 371 // Show any hidden or suppressed system notifications. |
| 372 if (system_tray_) | 372 if (system_tray_) |
| 373 system_tray_->SetHideNotifications(false); | 373 system_tray_->SetHideNotifications(false); |
| 374 } | 374 } |
| 375 | 375 |
| 376 } // namespace internal | 376 } // namespace internal |
| 377 } // namespace ash | 377 } // namespace ash |
| OLD | NEW |