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

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

Issue 2091953002: mash: Move TrayTracing to //ash/common/system/chromeos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 6 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/system/chromeos/tray_tracing.h" 5 #include "ash/common/system/chromeos/tray_tracing.h"
6 6
7 #include "ash/common/system/tray/actionable_view.h" 7 #include "ash/common/system/tray/actionable_view.h"
8 #include "ash/common/system/tray/fixed_sized_image_view.h" 8 #include "ash/common/system/tray/fixed_sized_image_view.h"
9 #include "ash/common/system/tray/system_tray_delegate.h" 9 #include "ash/common/system/tray/system_tray_delegate.h"
10 #include "ash/common/system/tray/tray_constants.h" 10 #include "ash/common/system/tray/tray_constants.h"
11 #include "ash/common/system/tray/wm_system_tray_notifier.h"
11 #include "ash/common/wm_shell.h" 12 #include "ash/common/wm_shell.h"
12 #include "ash/shell.h"
13 #include "ash/system/tray/system_tray.h" 13 #include "ash/system/tray/system_tray.h"
14 #include "ash/system/tray/system_tray_notifier.h"
15 #include "grit/ash_resources.h" 14 #include "grit/ash_resources.h"
16 #include "grit/ash_strings.h" 15 #include "grit/ash_strings.h"
17 #include "ui/base/resource/resource_bundle.h" 16 #include "ui/base/resource/resource_bundle.h"
18 #include "ui/gfx/image/image.h" 17 #include "ui/gfx/image/image.h"
19 #include "ui/views/controls/image_view.h" 18 #include "ui/views/controls/image_view.h"
20 #include "ui/views/controls/label.h" 19 #include "ui/views/controls/label.h"
21 #include "ui/views/layout/box_layout.h" 20 #include "ui/views/layout/box_layout.h"
22 21
23 namespace ash { 22 namespace ash {
24 namespace tray { 23 namespace tray {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 }; 59 };
61 60
62 } // namespace tray 61 } // namespace tray
63 62
64 //////////////////////////////////////////////////////////////////////////////// 63 ////////////////////////////////////////////////////////////////////////////////
65 // ash::TrayTracing 64 // ash::TrayTracing
66 65
67 TrayTracing::TrayTracing(SystemTray* system_tray) 66 TrayTracing::TrayTracing(SystemTray* system_tray)
68 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_TRACING), 67 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_TRACING),
69 default_(NULL) { 68 default_(NULL) {
70 DCHECK(Shell::GetInstance()->delegate());
71 DCHECK(system_tray); 69 DCHECK(system_tray);
72 Shell::GetInstance()->system_tray_notifier()->AddTracingObserver(this); 70 WmShell::Get()->system_tray_notifier()->AddTracingObserver(this);
73 } 71 }
74 72
75 TrayTracing::~TrayTracing() { 73 TrayTracing::~TrayTracing() {
76 Shell::GetInstance()->system_tray_notifier()->RemoveTracingObserver(this); 74 WmShell::Get()->system_tray_notifier()->RemoveTracingObserver(this);
77 } 75 }
78 76
79 void TrayTracing::SetTrayIconVisible(bool visible) { 77 void TrayTracing::SetTrayIconVisible(bool visible) {
80 if (tray_view()) 78 if (tray_view())
81 tray_view()->SetVisible(visible); 79 tray_view()->SetVisible(visible);
82 } 80 }
83 81
84 bool TrayTracing::GetInitialVisibility() { 82 bool TrayTracing::GetInitialVisibility() {
85 return false; 83 return false;
86 } 84 }
(...skipping 14 matching lines...) Expand all
101 } 99 }
102 100
103 void TrayTracing::DestroyDetailedView() { 101 void TrayTracing::DestroyDetailedView() {
104 } 102 }
105 103
106 void TrayTracing::OnTracingModeChanged(bool value) { 104 void TrayTracing::OnTracingModeChanged(bool value) {
107 SetTrayIconVisible(value); 105 SetTrayIconVisible(value);
108 } 106 }
109 107
110 } // namespace ash 108 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/tray_tracing.h ('k') | ash/common/system/tray/wm_system_tray_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698