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/tray/system_tray.h" | 5 #include "ash/common/system/tray/system_tray.h" |
6 | 6 |
7 #include "ash/common/ash_switches.h" | 7 #include "ash/common/ash_switches.h" |
8 #include "ash/common/login_status.h" | 8 #include "ash/common/login_status.h" |
9 #include "ash/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 AddTrayItem(new TrayIME(this)); | 190 AddTrayItem(new TrayIME(this)); |
191 AddTrayItem(tray_accessibility_); | 191 AddTrayItem(tray_accessibility_); |
192 AddTrayItem(new TrayTracing(this)); | 192 AddTrayItem(new TrayTracing(this)); |
193 AddTrayItem(new TrayPower(this, message_center::MessageCenter::Get())); | 193 AddTrayItem(new TrayPower(this, message_center::MessageCenter::Get())); |
194 AddTrayItem(new TrayNetwork(this)); | 194 AddTrayItem(new TrayNetwork(this)); |
195 AddTrayItem(new TrayVPN(this)); | 195 AddTrayItem(new TrayVPN(this)); |
196 AddTrayItem(new TraySms(this)); | 196 AddTrayItem(new TraySms(this)); |
197 AddTrayItem(new TrayBluetooth(this)); | 197 AddTrayItem(new TrayBluetooth(this)); |
198 tray_cast_ = new TrayCast(this); | 198 tray_cast_ = new TrayCast(this); |
199 AddTrayItem(tray_cast_); | 199 AddTrayItem(tray_cast_); |
200 // TODO(jamescook): Remove this when mus has support for display management | |
201 // and we have a DisplayManager equivalent. See http://crbug.com/548429 | |
202 std::unique_ptr<SystemTrayItem> tray_display = | |
203 delegate->CreateDisplayTrayItem(this); | |
204 if (tray_display) | |
205 AddTrayItem(tray_display.release()); | |
206 screen_capture_tray_item_ = new ScreenCaptureTrayItem(this); | 200 screen_capture_tray_item_ = new ScreenCaptureTrayItem(this); |
207 AddTrayItem(screen_capture_tray_item_); | 201 AddTrayItem(screen_capture_tray_item_); |
208 screen_share_tray_item_ = new ScreenShareTrayItem(this); | 202 screen_share_tray_item_ = new ScreenShareTrayItem(this); |
209 AddTrayItem(screen_share_tray_item_); | 203 AddTrayItem(screen_share_tray_item_); |
210 AddTrayItem(new MultiProfileMediaTrayItem(this)); | 204 AddTrayItem(new MultiProfileMediaTrayItem(this)); |
211 tray_audio_ = new TrayAudioChromeOs(this); | 205 tray_audio_ = new TrayAudioChromeOs(this); |
212 AddTrayItem(tray_audio_); | 206 AddTrayItem(tray_audio_); |
213 AddTrayItem(new TrayBrightness(this)); | 207 AddTrayItem(new TrayBrightness(this)); |
214 AddTrayItem(new TrayCapsLock(this)); | 208 AddTrayItem(new TrayCapsLock(this)); |
215 // TODO(jamescook): Remove this when mus has support for display management | 209 // TODO(jamescook): Remove this when mus has support for display management |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 .work_area() | 782 .work_area() |
789 .height(); | 783 .height(); |
790 if (work_area_height > 0) { | 784 if (work_area_height > 0) { |
791 UMA_HISTOGRAM_CUSTOM_COUNTS( | 785 UMA_HISTOGRAM_CUSTOM_COUNTS( |
792 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 786 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
793 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 787 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
794 } | 788 } |
795 } | 789 } |
796 | 790 |
797 } // namespace ash | 791 } // namespace ash |
OLD | NEW |