| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 if (!MaterialDesignController::IsSystemTrayMenuMaterial()) | 64 if (!MaterialDesignController::IsSystemTrayMenuMaterial()) |
| 65 return; | 65 return; |
| 66 | 66 |
| 67 TrayPopupItemStyle style(GetNativeTheme(), | 67 TrayPopupItemStyle style(GetNativeTheme(), |
| 68 TrayPopupItemStyle::FontStyle::DEFAULT_VIEW_LABEL); | 68 TrayPopupItemStyle::FontStyle::DEFAULT_VIEW_LABEL); |
| 69 style.SetupLabel(label_); | 69 style.SetupLabel(label_); |
| 70 | 70 |
| 71 // TODO(tdanderson): Update the icon used for tracing or remove it from | 71 // TODO(tdanderson): Update the icon used for tracing or remove it from |
| 72 // the system menu. See crbug.com/625691. | 72 // the system menu. See crbug.com/625691. |
| 73 image_->SetImage(CreateVectorIcon(gfx::VectorIconId::CODE, kMenuIconSize, | 73 image_->SetImage(CreateVectorIcon(gfx::VectorIconId::CODE, kMenuIconSize, |
| 74 style.GetForegroundColor())); | 74 style.GetIconColor())); |
| 75 } | 75 } |
| 76 | 76 |
| 77 bool PerformAction(const ui::Event& event) override { | 77 bool PerformAction(const ui::Event& event) override { |
| 78 WmShell::Get()->RecordUserMetricsAction( | 78 WmShell::Get()->RecordUserMetricsAction( |
| 79 UMA_STATUS_AREA_TRACING_DEFAULT_SELECTED); | 79 UMA_STATUS_AREA_TRACING_DEFAULT_SELECTED); |
| 80 WmShell::Get()->system_tray_controller()->ShowChromeSlow(); | 80 WmShell::Get()->system_tray_controller()->ShowChromeSlow(); |
| 81 CloseSystemBubble(); | 81 CloseSystemBubble(); |
| 82 return true; | 82 return true; |
| 83 } | 83 } |
| 84 | 84 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 default_ = NULL; | 128 default_ = NULL; |
| 129 } | 129 } |
| 130 | 130 |
| 131 void TrayTracing::DestroyDetailedView() {} | 131 void TrayTracing::DestroyDetailedView() {} |
| 132 | 132 |
| 133 void TrayTracing::OnTracingModeChanged(bool value) { | 133 void TrayTracing::OnTracingModeChanged(bool value) { |
| 134 SetTrayIconVisible(value); | 134 SetTrayIconVisible(value); |
| 135 } | 135 } |
| 136 | 136 |
| 137 } // namespace ash | 137 } // namespace ash |
| OLD | NEW |