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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 Init(params); | 320 Init(params); |
321 set_focus_on_creation(false); | 321 set_focus_on_creation(false); |
322 SetContentsView(status_area_widget_delegate_); | 322 SetContentsView(status_area_widget_delegate_); |
323 GetNativeView()->SetName("StatusAreaWidget"); | 323 GetNativeView()->SetName("StatusAreaWidget"); |
324 } | 324 } |
325 | 325 |
326 StatusAreaWidget::~StatusAreaWidget() { | 326 StatusAreaWidget::~StatusAreaWidget() { |
327 } | 327 } |
328 | 328 |
329 void StatusAreaWidget::CreateTrayViews(ShellDelegate* shell_delegate) { | 329 void StatusAreaWidget::CreateTrayViews(ShellDelegate* shell_delegate) { |
| 330 AddWebNotificationTray(); |
330 AddSystemTray(shell_delegate); | 331 AddSystemTray(shell_delegate); |
331 AddWebNotificationTray(); | |
332 // Initialize() must be called after all trays have been created. | 332 // Initialize() must be called after all trays have been created. |
333 if (system_tray_) | 333 if (system_tray_) |
334 system_tray_->Initialize(); | 334 system_tray_->Initialize(); |
335 if (web_notification_tray_) | 335 if (web_notification_tray_) |
336 web_notification_tray_->Initialize(); | 336 web_notification_tray_->Initialize(); |
337 UpdateAfterLoginStatusChange(system_tray_delegate_->GetUserLoginStatus()); | 337 UpdateAfterLoginStatusChange(system_tray_delegate_->GetUserLoginStatus()); |
338 } | 338 } |
339 | 339 |
340 void StatusAreaWidget::Shutdown() { | 340 void StatusAreaWidget::Shutdown() { |
341 // Destroy the trays early, causing them to be removed from the view | 341 // Destroy the trays early, causing them to be removed from the view |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 web_notification_tray_->IsMouseInNotificationBubble()); | 425 web_notification_tray_->IsMouseInNotificationBubble()); |
426 } | 426 } |
427 if (should_show_launcher != should_show_launcher_) { | 427 if (should_show_launcher != should_show_launcher_) { |
428 should_show_launcher_ = should_show_launcher; | 428 should_show_launcher_ = should_show_launcher; |
429 Shell::GetInstance()->shelf()->UpdateAutoHideState(); | 429 Shell::GetInstance()->shelf()->UpdateAutoHideState(); |
430 } | 430 } |
431 } | 431 } |
432 | 432 |
433 } // namespace internal | 433 } // namespace internal |
434 } // namespace ash | 434 } // namespace ash |
OLD | NEW |