| OLD | NEW |
| 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_delegate.h" | 10 #include "ash/common/system/tray/system_tray_delegate.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(DefaultTracingView); | 60 DISALLOW_COPY_AND_ASSIGN(DefaultTracingView); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace tray | 63 } // namespace tray |
| 64 | 64 |
| 65 //////////////////////////////////////////////////////////////////////////////// | 65 //////////////////////////////////////////////////////////////////////////////// |
| 66 // ash::TrayTracing | 66 // ash::TrayTracing |
| 67 | 67 |
| 68 TrayTracing::TrayTracing(SystemTray* system_tray) | 68 TrayTracing::TrayTracing(SystemTray* system_tray) |
| 69 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_TRACING), default_(NULL) { | 69 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_TRACING, UMA_TRACING), |
| 70 default_(nullptr) { |
| 70 DCHECK(system_tray); | 71 DCHECK(system_tray); |
| 71 WmShell::Get()->system_tray_notifier()->AddTracingObserver(this); | 72 WmShell::Get()->system_tray_notifier()->AddTracingObserver(this); |
| 72 } | 73 } |
| 73 | 74 |
| 74 TrayTracing::~TrayTracing() { | 75 TrayTracing::~TrayTracing() { |
| 75 WmShell::Get()->system_tray_notifier()->RemoveTracingObserver(this); | 76 WmShell::Get()->system_tray_notifier()->RemoveTracingObserver(this); |
| 76 } | 77 } |
| 77 | 78 |
| 78 void TrayTracing::SetTrayIconVisible(bool visible) { | 79 void TrayTracing::SetTrayIconVisible(bool visible) { |
| 79 if (tray_view()) | 80 if (tray_view()) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 99 default_ = NULL; | 100 default_ = NULL; |
| 100 } | 101 } |
| 101 | 102 |
| 102 void TrayTracing::DestroyDetailedView() {} | 103 void TrayTracing::DestroyDetailedView() {} |
| 103 | 104 |
| 104 void TrayTracing::OnTracingModeChanged(bool value) { | 105 void TrayTracing::OnTracingModeChanged(bool value) { |
| 105 SetTrayIconVisible(value); | 106 SetTrayIconVisible(value); |
| 106 } | 107 } |
| 107 | 108 |
| 108 } // namespace ash | 109 } // namespace ash |
| OLD | NEW |