| 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/common/shell_window_ids.h" | 7 #include "ash/common/shell_window_ids.h" |
| 8 #include "ash/common/system/tray/system_tray_delegate.h" | 8 #include "ash/common/system/tray/system_tray_delegate.h" |
| 9 #include "ash/common/wm_root_window_controller.h" | 9 #include "ash/common/wm_root_window_controller.h" |
| 10 #include "ash/common/wm_shell.h" |
| 10 #include "ash/common/wm_window.h" | 11 #include "ash/common/wm_window.h" |
| 11 #include "ash/shelf/shelf_layout_manager.h" | 12 #include "ash/shelf/shelf_layout_manager.h" |
| 12 #include "ash/shelf/shelf_widget.h" | 13 #include "ash/shelf/shelf_widget.h" |
| 13 #include "ash/shell.h" | 14 #include "ash/shell.h" |
| 14 #include "ash/shell_delegate.h" | 15 #include "ash/shell_delegate.h" |
| 15 #include "ash/system/overview/overview_button_tray.h" | 16 #include "ash/system/overview/overview_button_tray.h" |
| 16 #include "ash/system/status_area_widget_delegate.h" | 17 #include "ash/system/status_area_widget_delegate.h" |
| 17 #include "ash/system/tray/system_tray.h" | 18 #include "ash/system/tray/system_tray.h" |
| 18 #include "ash/system/web_notification/web_notification_tray.h" | 19 #include "ash/system/web_notification/web_notification_tray.h" |
| 19 #include "ash/wm/window_properties.h" | 20 #include "ash/wm/window_properties.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 57 |
| 57 void StatusAreaWidget::CreateTrayViews() { | 58 void StatusAreaWidget::CreateTrayViews() { |
| 58 AddOverviewButtonTray(); | 59 AddOverviewButtonTray(); |
| 59 AddSystemTray(); | 60 AddSystemTray(); |
| 60 AddWebNotificationTray(); | 61 AddWebNotificationTray(); |
| 61 #if defined(OS_CHROMEOS) | 62 #if defined(OS_CHROMEOS) |
| 62 AddLogoutButtonTray(); | 63 AddLogoutButtonTray(); |
| 63 AddVirtualKeyboardTray(); | 64 AddVirtualKeyboardTray(); |
| 64 #endif | 65 #endif |
| 65 | 66 |
| 66 SystemTrayDelegate* delegate = | 67 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); |
| 67 ash::Shell::GetInstance()->system_tray_delegate(); | |
| 68 DCHECK(delegate); | 68 DCHECK(delegate); |
| 69 // Initialize after all trays have been created. | 69 // Initialize after all trays have been created. |
| 70 system_tray_->InitializeTrayItems(delegate); | 70 system_tray_->InitializeTrayItems(delegate); |
| 71 web_notification_tray_->Initialize(); | 71 web_notification_tray_->Initialize(); |
| 72 #if defined(OS_CHROMEOS) | 72 #if defined(OS_CHROMEOS) |
| 73 logout_button_tray_->Initialize(); | 73 logout_button_tray_->Initialize(); |
| 74 virtual_keyboard_tray_->Initialize(); | 74 virtual_keyboard_tray_->Initialize(); |
| 75 #endif | 75 #endif |
| 76 overview_button_tray_->Initialize(); | 76 overview_button_tray_->Initialize(); |
| 77 SetShelfAlignment(system_tray_->shelf_alignment()); | 77 SetShelfAlignment(system_tray_->shelf_alignment()); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); | 206 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); |
| 207 #if defined(OS_CHROMEOS) | 207 #if defined(OS_CHROMEOS) |
| 208 if (logout_button_tray_) | 208 if (logout_button_tray_) |
| 209 logout_button_tray_->UpdateAfterLoginStatusChange(login_status); | 209 logout_button_tray_->UpdateAfterLoginStatusChange(login_status); |
| 210 #endif | 210 #endif |
| 211 if (overview_button_tray_) | 211 if (overview_button_tray_) |
| 212 overview_button_tray_->UpdateAfterLoginStatusChange(login_status); | 212 overview_button_tray_->UpdateAfterLoginStatusChange(login_status); |
| 213 } | 213 } |
| 214 | 214 |
| 215 } // namespace ash | 215 } // namespace ash |
| OLD | NEW |