| 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/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "ash/common/metrics/user_metrics_action.h" | 8 #include "ash/common/metrics/user_metrics_action.h" |
| 9 #include "ash/common/system/tray/actionable_view.h" | 9 #include "ash/common/system/tray/actionable_view.h" |
| 10 #include "ash/common/system/tray/fixed_sized_image_view.h" | 10 #include "ash/common/system/tray/fixed_sized_image_view.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(DefaultTracingView); | 70 DISALLOW_COPY_AND_ASSIGN(DefaultTracingView); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace tray | 73 } // namespace tray |
| 74 | 74 |
| 75 //////////////////////////////////////////////////////////////////////////////// | 75 //////////////////////////////////////////////////////////////////////////////// |
| 76 // ash::TrayTracing | 76 // ash::TrayTracing |
| 77 | 77 |
| 78 TrayTracing::TrayTracing(SystemTray* system_tray) | 78 TrayTracing::TrayTracing(SystemTray* system_tray) |
| 79 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_TRACING), default_(NULL) { | 79 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_TRACING, UMA_TRACING), |
| 80 default_(nullptr) { |
| 80 DCHECK(system_tray); | 81 DCHECK(system_tray); |
| 81 WmShell::Get()->system_tray_notifier()->AddTracingObserver(this); | 82 WmShell::Get()->system_tray_notifier()->AddTracingObserver(this); |
| 82 } | 83 } |
| 83 | 84 |
| 84 TrayTracing::~TrayTracing() { | 85 TrayTracing::~TrayTracing() { |
| 85 WmShell::Get()->system_tray_notifier()->RemoveTracingObserver(this); | 86 WmShell::Get()->system_tray_notifier()->RemoveTracingObserver(this); |
| 86 } | 87 } |
| 87 | 88 |
| 88 void TrayTracing::SetTrayIconVisible(bool visible) { | 89 void TrayTracing::SetTrayIconVisible(bool visible) { |
| 89 if (tray_view()) | 90 if (tray_view()) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 109 default_ = NULL; | 110 default_ = NULL; |
| 110 } | 111 } |
| 111 | 112 |
| 112 void TrayTracing::DestroyDetailedView() {} | 113 void TrayTracing::DestroyDetailedView() {} |
| 113 | 114 |
| 114 void TrayTracing::OnTracingModeChanged(bool value) { | 115 void TrayTracing::OnTracingModeChanged(bool value) { |
| 115 SetTrayIconVisible(value); | 116 SetTrayIconVisible(value); |
| 116 } | 117 } |
| 117 | 118 |
| 118 } // namespace ash | 119 } // namespace ash |
| OLD | NEW |