| 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/chromeos/ime_menu/ime_menu_tray.h" | 9 #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h" |
| 10 #include "ash/common/system/chromeos/palette/palette_tray.h" | 10 #include "ash/common/system/chromeos/palette/palette_tray.h" |
| 11 #include "ash/common/system/chromeos/palette/palette_utils.h" | 11 #include "ash/common/system/chromeos/palette/palette_utils.h" |
| 12 #include "ash/common/system/chromeos/session/logout_button_tray.h" | 12 #include "ash/common/system/chromeos/session/logout_button_tray.h" |
| 13 #include "ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h" | 13 #include "ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h" |
| 14 #include "ash/common/system/overview/overview_button_tray.h" | 14 #include "ash/common/system/overview/overview_button_tray.h" |
| 15 #include "ash/common/system/status_area_widget_delegate.h" | 15 #include "ash/common/system/status_area_widget_delegate.h" |
| 16 #include "ash/common/system/tray/system_tray.h" | 16 #include "ash/common/system/tray/system_tray.h" |
| 17 #include "ash/common/system/tray/system_tray_delegate.h" | 17 #include "ash/common/system/tray/system_tray_delegate.h" |
| 18 #include "ash/common/system/web_notification/web_notification_tray.h" | 18 #include "ash/common/system/web_notification/web_notification_tray.h" |
| 19 #include "ash/common/wm_shell.h" | |
| 20 #include "ash/common/wm_window.h" | 19 #include "ash/common/wm_window.h" |
| 21 #include "ash/public/cpp/shell_window_ids.h" | 20 #include "ash/public/cpp/shell_window_ids.h" |
| 22 #include "ash/root_window_controller.h" | 21 #include "ash/root_window_controller.h" |
| 22 #include "ash/shell.h" |
| 23 #include "base/i18n/time_formatting.h" | 23 #include "base/i18n/time_formatting.h" |
| 24 #include "ui/display/display.h" | 24 #include "ui/display/display.h" |
| 25 #include "ui/native_theme/native_theme_dark_aura.h" | 25 #include "ui/native_theme/native_theme_dark_aura.h" |
| 26 | 26 |
| 27 namespace ash { | 27 namespace ash { |
| 28 | 28 |
| 29 StatusAreaWidget::StatusAreaWidget(WmWindow* status_container, | 29 StatusAreaWidget::StatusAreaWidget(WmWindow* status_container, |
| 30 WmShelf* wm_shelf) | 30 WmShelf* wm_shelf) |
| 31 : status_area_widget_delegate_(new StatusAreaWidgetDelegate), | 31 : status_area_widget_delegate_(new StatusAreaWidgetDelegate), |
| 32 overview_button_tray_(nullptr), | 32 overview_button_tray_(nullptr), |
| (...skipping 22 matching lines...) Expand all Loading... |
| 55 | 55 |
| 56 void StatusAreaWidget::CreateTrayViews() { | 56 void StatusAreaWidget::CreateTrayViews() { |
| 57 AddOverviewButtonTray(); | 57 AddOverviewButtonTray(); |
| 58 AddSystemTray(); | 58 AddSystemTray(); |
| 59 AddWebNotificationTray(); | 59 AddWebNotificationTray(); |
| 60 AddPaletteTray(); | 60 AddPaletteTray(); |
| 61 AddVirtualKeyboardTray(); | 61 AddVirtualKeyboardTray(); |
| 62 AddImeMenuTray(); | 62 AddImeMenuTray(); |
| 63 AddLogoutButtonTray(); | 63 AddLogoutButtonTray(); |
| 64 | 64 |
| 65 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); | 65 SystemTrayDelegate* delegate = Shell::Get()->system_tray_delegate(); |
| 66 DCHECK(delegate); | 66 DCHECK(delegate); |
| 67 // Initialize after all trays have been created. | 67 // Initialize after all trays have been created. |
| 68 system_tray_->InitializeTrayItems(delegate, web_notification_tray_); | 68 system_tray_->InitializeTrayItems(delegate, web_notification_tray_); |
| 69 web_notification_tray_->Initialize(); | 69 web_notification_tray_->Initialize(); |
| 70 logout_button_tray_->Initialize(); | 70 logout_button_tray_->Initialize(); |
| 71 if (palette_tray_) | 71 if (palette_tray_) |
| 72 palette_tray_->Initialize(); | 72 palette_tray_->Initialize(); |
| 73 virtual_keyboard_tray_->Initialize(); | 73 virtual_keyboard_tray_->Initialize(); |
| 74 ime_menu_tray_->Initialize(); | 74 ime_menu_tray_->Initialize(); |
| 75 overview_button_tray_->Initialize(); | 75 overview_button_tray_->Initialize(); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 ime_menu_tray_ = new ImeMenuTray(wm_shelf_); | 233 ime_menu_tray_ = new ImeMenuTray(wm_shelf_); |
| 234 status_area_widget_delegate_->AddTray(ime_menu_tray_); | 234 status_area_widget_delegate_->AddTray(ime_menu_tray_); |
| 235 } | 235 } |
| 236 | 236 |
| 237 void StatusAreaWidget::AddOverviewButtonTray() { | 237 void StatusAreaWidget::AddOverviewButtonTray() { |
| 238 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); | 238 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); |
| 239 status_area_widget_delegate_->AddTray(overview_button_tray_); | 239 status_area_widget_delegate_->AddTray(overview_button_tray_); |
| 240 } | 240 } |
| 241 | 241 |
| 242 } // namespace ash | 242 } // namespace ash |
| OLD | NEW |