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 <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ash/key_event_watcher.h" | 11 #include "ash/key_event_watcher.h" |
12 #include "ash/login_status.h" | 12 #include "ash/login_status.h" |
13 #include "ash/public/cpp/config.h" | 13 #include "ash/public/cpp/config.h" |
14 #include "ash/public/cpp/shell_window_ids.h" | 14 #include "ash/public/cpp/shell_window_ids.h" |
15 #include "ash/root_window_controller.h" | 15 #include "ash/root_window_controller.h" |
16 #include "ash/session/session_controller.h" | 16 #include "ash/session/session_controller.h" |
17 #include "ash/shelf/wm_shelf.h" | 17 #include "ash/shelf/shelf.h" |
18 #include "ash/shell.h" | 18 #include "ash/shell.h" |
19 #include "ash/shell_port.h" | 19 #include "ash/shell_port.h" |
20 #include "ash/strings/grit/ash_strings.h" | 20 #include "ash/strings/grit/ash_strings.h" |
21 #include "ash/system/audio/tray_audio.h" | 21 #include "ash/system/audio/tray_audio.h" |
22 #include "ash/system/bluetooth/tray_bluetooth.h" | 22 #include "ash/system/bluetooth/tray_bluetooth.h" |
23 #include "ash/system/brightness/tray_brightness.h" | 23 #include "ash/system/brightness/tray_brightness.h" |
24 #include "ash/system/cast/tray_cast.h" | 24 #include "ash/system/cast/tray_cast.h" |
25 #include "ash/system/date/tray_system_info.h" | 25 #include "ash/system/date/tray_system_info.h" |
26 #include "ash/system/display_scale/tray_scale.h" | 26 #include "ash/system/display_scale/tray_scale.h" |
27 #include "ash/system/enterprise/tray_enterprise.h" | 27 #include "ash/system/enterprise/tray_enterprise.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 } | 192 } |
193 | 193 |
194 private: | 194 private: |
195 SystemTray* tray_; | 195 SystemTray* tray_; |
196 | 196 |
197 DISALLOW_COPY_AND_ASSIGN(ActivationObserver); | 197 DISALLOW_COPY_AND_ASSIGN(ActivationObserver); |
198 }; | 198 }; |
199 | 199 |
200 // SystemTray | 200 // SystemTray |
201 | 201 |
202 SystemTray::SystemTray(WmShelf* wm_shelf) : TrayBackgroundView(wm_shelf) { | 202 SystemTray::SystemTray(Shelf* shelf) : TrayBackgroundView(shelf) { |
203 SetInkDropMode(InkDropMode::ON); | 203 SetInkDropMode(InkDropMode::ON); |
204 | 204 |
205 // Since user avatar is on the right hand side of System tray of a | 205 // Since user avatar is on the right hand side of System tray of a |
206 // horizontal shelf and that is sufficient to indicate separation, no | 206 // horizontal shelf and that is sufficient to indicate separation, no |
207 // separator is required. | 207 // separator is required. |
208 set_separator_visibility(false); | 208 set_separator_visibility(false); |
209 } | 209 } |
210 | 210 |
211 SystemTray::~SystemTray() { | 211 SystemTray::~SystemTray() { |
212 // Destroy any child views that might have back pointers before ~View(). | 212 // Destroy any child views that might have back pointers before ~View(). |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 .work_area() | 708 .work_area() |
709 .height(); | 709 .height(); |
710 if (work_area_height > 0) { | 710 if (work_area_height > 0) { |
711 UMA_HISTOGRAM_CUSTOM_COUNTS( | 711 UMA_HISTOGRAM_CUSTOM_COUNTS( |
712 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 712 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
713 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 713 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
714 } | 714 } |
715 } | 715 } |
716 | 716 |
717 } // namespace ash | 717 } // namespace ash |
OLD | NEW |