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

Side by Side Diff: ash/common/system/chromeos/tray_tracing.cc

Issue 2775973002: Promotes more accessors from WmShell to Shell (Closed)
Patch Set: feedback Created 3 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/tray_tracing.h" 5 #include "ash/common/system/chromeos/tray_tracing.h"
6 6
7 #include "ash/common/metrics/user_metrics_action.h" 7 #include "ash/common/metrics/user_metrics_action.h"
8 #include "ash/common/system/tray/actionable_view.h" 8 #include "ash/common/system/tray/actionable_view.h"
9 #include "ash/common/system/tray/fixed_sized_image_view.h" 9 #include "ash/common/system/tray/fixed_sized_image_view.h"
10 #include "ash/common/system/tray/system_tray.h" 10 #include "ash/common/system/tray/system_tray.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 } // namespace tray 69 } // namespace tray
70 70
71 //////////////////////////////////////////////////////////////////////////////// 71 ////////////////////////////////////////////////////////////////////////////////
72 // ash::TrayTracing 72 // ash::TrayTracing
73 73
74 TrayTracing::TrayTracing(SystemTray* system_tray) 74 TrayTracing::TrayTracing(SystemTray* system_tray)
75 : TrayImageItem(system_tray, kSystemTrayTracingIcon, UMA_TRACING), 75 : TrayImageItem(system_tray, kSystemTrayTracingIcon, UMA_TRACING),
76 default_(nullptr) { 76 default_(nullptr) {
77 DCHECK(system_tray); 77 DCHECK(system_tray);
78 WmShell::Get()->system_tray_notifier()->AddTracingObserver(this); 78 Shell::Get()->system_tray_notifier()->AddTracingObserver(this);
79 } 79 }
80 80
81 TrayTracing::~TrayTracing() { 81 TrayTracing::~TrayTracing() {
82 WmShell::Get()->system_tray_notifier()->RemoveTracingObserver(this); 82 Shell::Get()->system_tray_notifier()->RemoveTracingObserver(this);
83 } 83 }
84 84
85 void TrayTracing::SetTrayIconVisible(bool visible) { 85 void TrayTracing::SetTrayIconVisible(bool visible) {
86 if (tray_view()) 86 if (tray_view())
87 tray_view()->SetVisible(visible); 87 tray_view()->SetVisible(visible);
88 } 88 }
89 89
90 bool TrayTracing::GetInitialVisibility() { 90 bool TrayTracing::GetInitialVisibility() {
91 return false; 91 return false;
92 } 92 }
(...skipping 13 matching lines...) Expand all
106 default_ = NULL; 106 default_ = NULL;
107 } 107 }
108 108
109 void TrayTracing::DestroyDetailedView() {} 109 void TrayTracing::DestroyDetailedView() {}
110 110
111 void TrayTracing::OnTracingModeChanged(bool value) { 111 void TrayTracing::OnTracingModeChanged(bool value) {
112 SetTrayIconVisible(value); 112 SetTrayIconVisible(value);
113 } 113 }
114 114
115 } // namespace ash 115 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/system_clock_observer.cc ('k') | ash/common/system/date/date_default_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698