| 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/common/system/status_area_widget.h" | 5 #include "ash/common/system/status_area_widget.h" |
| 6 | 6 |
| 7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "ash/common/shelf/wm_shelf.h" | 8 #include "ash/common/shelf/wm_shelf.h" |
| 9 #include "ash/common/system/overview/overview_button_tray.h" | 9 #include "ash/common/system/overview/overview_button_tray.h" |
| 10 #include "ash/common/system/status_area_widget_delegate.h" | 10 #include "ash/common/system/status_area_widget_delegate.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 AddLogoutButtonTray(); | 70 AddLogoutButtonTray(); |
| 71 #endif | 71 #endif |
| 72 | 72 |
| 73 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); | 73 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); |
| 74 DCHECK(delegate); | 74 DCHECK(delegate); |
| 75 // Initialize after all trays have been created. | 75 // Initialize after all trays have been created. |
| 76 system_tray_->InitializeTrayItems(delegate, web_notification_tray_); | 76 system_tray_->InitializeTrayItems(delegate, web_notification_tray_); |
| 77 web_notification_tray_->Initialize(); | 77 web_notification_tray_->Initialize(); |
| 78 #if defined(OS_CHROMEOS) | 78 #if defined(OS_CHROMEOS) |
| 79 logout_button_tray_->Initialize(); | 79 logout_button_tray_->Initialize(); |
| 80 if (palette_tray_) |
| 81 palette_tray_->Initialize(); |
| 80 virtual_keyboard_tray_->Initialize(); | 82 virtual_keyboard_tray_->Initialize(); |
| 81 ime_menu_tray_->Initialize(); | 83 ime_menu_tray_->Initialize(); |
| 82 #endif | 84 #endif |
| 83 overview_button_tray_->Initialize(); | 85 overview_button_tray_->Initialize(); |
| 84 SetShelfAlignment(system_tray_->shelf_alignment()); | 86 SetShelfAlignment(system_tray_->shelf_alignment()); |
| 85 UpdateAfterLoginStatusChange(delegate->GetUserLoginStatus()); | 87 UpdateAfterLoginStatusChange(delegate->GetUserLoginStatus()); |
| 86 } | 88 } |
| 87 | 89 |
| 88 void StatusAreaWidget::Shutdown() { | 90 void StatusAreaWidget::Shutdown() { |
| 89 system_tray_->Shutdown(); | 91 system_tray_->Shutdown(); |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 return false; | 299 return false; |
| 298 } | 300 } |
| 299 #endif | 301 #endif |
| 300 | 302 |
| 301 void StatusAreaWidget::AddOverviewButtonTray() { | 303 void StatusAreaWidget::AddOverviewButtonTray() { |
| 302 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); | 304 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); |
| 303 status_area_widget_delegate_->AddTray(overview_button_tray_); | 305 status_area_widget_delegate_->AddTray(overview_button_tray_); |
| 304 } | 306 } |
| 305 | 307 |
| 306 } // namespace ash | 308 } // namespace ash |
| OLD | NEW |