| 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/tray/system_tray.h" | 5 #include "ash/system/tray/system_tray.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/shell/panel_window.h" | 9 #include "ash/shell/panel_window.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| 11 #include "ash/system/audio/tray_volume.h" | 11 #include "ash/system/audio/tray_volume.h" |
| 12 #include "ash/system/bluetooth/tray_bluetooth.h" | 12 #include "ash/system/bluetooth/tray_bluetooth.h" |
| 13 #include "ash/system/brightness/tray_brightness.h" | 13 #include "ash/system/brightness/tray_brightness.h" |
| 14 #include "ash/system/chromeos/tray_display.h" | 14 #include "ash/system/chromeos/tray_display.h" |
| 15 #include "ash/system/date/tray_date.h" | 15 #include "ash/system/date/tray_date.h" |
| 16 #include "ash/system/drive/tray_drive.h" | 16 #include "ash/system/drive/tray_drive.h" |
| 17 #include "ash/system/ime/tray_ime.h" | 17 #include "ash/system/ime/tray_ime.h" |
| 18 #include "ash/system/locale/tray_locale.h" | 18 #include "ash/system/locale/tray_locale.h" |
| 19 #include "ash/system/logout_button/tray_logout_button.h" | 19 #include "ash/system/logout_button/tray_logout_button.h" |
| 20 #include "ash/system/monitor/tray_monitor.h" | 20 #include "ash/system/monitor/tray_monitor.h" |
| 21 #include "ash/system/power/power_supply_status.h" | 21 #include "ash/system/power/power_supply_status.h" |
| 22 #include "ash/system/power/tray_power.h" | 22 #include "ash/system/power/tray_power.h" |
| 23 #include "ash/system/session_length_limit/tray_session_length_limit.h" |
| 23 #include "ash/system/settings/tray_settings.h" | 24 #include "ash/system/settings/tray_settings.h" |
| 24 #include "ash/system/status_area_widget.h" | 25 #include "ash/system/status_area_widget.h" |
| 25 #include "ash/system/tray/system_tray_delegate.h" | 26 #include "ash/system/tray/system_tray_delegate.h" |
| 26 #include "ash/system/tray/system_tray_item.h" | 27 #include "ash/system/tray/system_tray_item.h" |
| 27 #include "ash/system/tray/tray_bubble_wrapper.h" | 28 #include "ash/system/tray/tray_bubble_wrapper.h" |
| 28 #include "ash/system/tray/tray_constants.h" | 29 #include "ash/system/tray/tray_constants.h" |
| 29 #include "ash/system/tray_accessibility.h" | 30 #include "ash/system/tray_accessibility.h" |
| 30 #include "ash/system/tray_caps_lock.h" | 31 #include "ash/system/tray_caps_lock.h" |
| 31 #include "ash/system/tray_update.h" | 32 #include "ash/system/tray_update.h" |
| 32 #include "ash/system/user/login_status.h" | 33 #include "ash/system/user/login_status.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 (*it)->DestroyTrayView(); | 122 (*it)->DestroyTrayView(); |
| 122 } | 123 } |
| 123 } | 124 } |
| 124 | 125 |
| 125 void SystemTray::InitializeTrayItems(SystemTrayDelegate* delegate) { | 126 void SystemTray::InitializeTrayItems(SystemTrayDelegate* delegate) { |
| 126 internal::TrayBackgroundView::Initialize(); | 127 internal::TrayBackgroundView::Initialize(); |
| 127 CreateItems(delegate); | 128 CreateItems(delegate); |
| 128 } | 129 } |
| 129 | 130 |
| 130 void SystemTray::CreateItems(SystemTrayDelegate* delegate) { | 131 void SystemTray::CreateItems(SystemTrayDelegate* delegate) { |
| 132 AddTrayItem(new internal::TraySessionLengthLimit(this)); |
| 131 AddTrayItem(new internal::TrayLogoutButton(this)); | 133 AddTrayItem(new internal::TrayLogoutButton(this)); |
| 132 AddTrayItem(new internal::TrayUser(this)); | 134 AddTrayItem(new internal::TrayUser(this)); |
| 133 AddTrayItem(new internal::TrayIME(this)); | 135 AddTrayItem(new internal::TrayIME(this)); |
| 134 AddTrayItem(new internal::TrayAccessibility(this)); | 136 AddTrayItem(new internal::TrayAccessibility(this)); |
| 135 AddTrayItem(new internal::TrayPower(this)); | 137 AddTrayItem(new internal::TrayPower(this)); |
| 136 #if defined(OS_CHROMEOS) | 138 #if defined(OS_CHROMEOS) |
| 137 AddTrayItem(new internal::TrayNetwork(this)); | 139 AddTrayItem(new internal::TrayNetwork(this)); |
| 138 AddTrayItem(new internal::TrayVPN(this)); | 140 AddTrayItem(new internal::TrayVPN(this)); |
| 139 AddTrayItem(new internal::TraySms(this)); | 141 AddTrayItem(new internal::TraySms(this)); |
| 140 #endif | 142 #endif |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 ConvertPointToWidget(this, &point); | 541 ConvertPointToWidget(this, &point); |
| 540 arrow_offset = point.x(); | 542 arrow_offset = point.x(); |
| 541 } | 543 } |
| 542 } | 544 } |
| 543 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); | 545 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); |
| 544 } | 546 } |
| 545 return true; | 547 return true; |
| 546 } | 548 } |
| 547 | 549 |
| 548 } // namespace ash | 550 } // namespace ash |
| OLD | NEW |