Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(521)

Side by Side Diff: ash/system/fractional_view/tray_scale.cc

Issue 2849953004: SV Test
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/system/fractional_view/tray_scale.h ('k') | ash/system/tray/system_tray.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ash/system/fractional_view/tray_scale.h"
6
7 #include "ash/resources/vector_icons/vector_icons.h"
8 #include "ash/root_window_controller.h"
9 #include "ash/shell_port.h"
10 #include "ash/system/fractional_view/scale_detailed_view.h"
11 #include "ash/system/fractional_view/scale_view.h"
12 #include "ash/system/tray/system_tray.h"
13 #include "ash/system/tray/tray_constants.h"
14 #include "ash/wm_window.h"
15 #include "ui/display/display.h"
16 #include "ui/display/manager/managed_display_info.h"
17 #include "ui/display/screen.h"
18 #include "ui/views/view.h"
19
20 namespace ash {
21
22 TrayScale::TrayScale(SystemTray* system_tray)
23 : TrayImageItem(system_tray, kSystemTrayVolumeMuteIcon, UMA_NOT_RECORDED) {
24 display::Screen::GetScreen()->AddObserver(this);
25 }
26
27 TrayScale::~TrayScale() {
28 display::Screen::GetScreen()->RemoveObserver(this);
29 }
30
31 views::View* TrayScale::CreateDefaultView(LoginStatus status) {
32 scale_view_ = new tray::ScaleView(this, true);
33 return scale_view_;
34 }
35
36 views::View* TrayScale::CreateDetailedView(LoginStatus status) {
37 scale_detail_view_ = new tray::ScaleDetailedView(this);
38 return scale_detail_view_;
39 }
40
41 void TrayScale::DestroyDefaultView() {
42 scale_view_ = nullptr;
43 }
44
45 void TrayScale::DestroyDetailedView() {
46 scale_detail_view_ = nullptr;
47 }
48
49 bool TrayScale::ShouldShowShelf() const {
50 return true;
51 }
52
53 void TrayScale::OnDisplayAdded(const display::Display& new_display) {}
54
55 void TrayScale::OnDisplayRemoved(const display::Display& old_display) {}
56
57 void TrayScale::OnDisplayMetricsChanged(const display::Display& display,
58 uint32_t changed_metrics) {}
59
60 bool TrayScale::GetInitialVisibility() {
61 return true;
62 }
63
64 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/fractional_view/tray_scale.h ('k') | ash/system/tray/system_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698