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" |
11 #include "ash/common/system/tray/system_tray.h" | 11 #include "ash/common/system/tray/system_tray.h" |
12 #include "ash/common/system/tray/system_tray_delegate.h" | 12 #include "ash/common/system/tray/system_tray_controller.h" |
13 #include "ash/common/system/tray/system_tray_notifier.h" | 13 #include "ash/common/system/tray/system_tray_notifier.h" |
14 #include "ash/common/system/tray/tray_constants.h" | 14 #include "ash/common/system/tray/tray_constants.h" |
15 #include "ash/common/system/tray/tray_popup_item_style.h" | 15 #include "ash/common/system/tray/tray_popup_item_style.h" |
16 #include "ash/common/wm_shell.h" | 16 #include "ash/common/wm_shell.h" |
17 #include "grit/ash_resources.h" | 17 #include "grit/ash_resources.h" |
18 #include "grit/ash_strings.h" | 18 #include "grit/ash_strings.h" |
19 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
20 #include "ui/gfx/image/image.h" | 20 #include "ui/gfx/image/image.h" |
21 #include "ui/gfx/paint_vector_icon.h" | 21 #include "ui/gfx/paint_vector_icon.h" |
22 #include "ui/gfx/vector_icons_public.h" | 22 #include "ui/gfx/vector_icons_public.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 // TODO(tdanderson): Update the icon used for tracing or remove it from | 68 // TODO(tdanderson): Update the icon used for tracing or remove it from |
69 // the system menu. See crbug.com/625691. | 69 // the system menu. See crbug.com/625691. |
70 image_->SetImage(CreateVectorIcon(gfx::VectorIconId::CODE, kMenuIconSize, | 70 image_->SetImage(CreateVectorIcon(gfx::VectorIconId::CODE, kMenuIconSize, |
71 style.GetForegroundColor())); | 71 style.GetForegroundColor())); |
72 } | 72 } |
73 | 73 |
74 bool PerformAction(const ui::Event& event) override { | 74 bool PerformAction(const ui::Event& event) override { |
75 WmShell::Get()->RecordUserMetricsAction( | 75 WmShell::Get()->RecordUserMetricsAction( |
76 UMA_STATUS_AREA_TRACING_DEFAULT_SELECTED); | 76 UMA_STATUS_AREA_TRACING_DEFAULT_SELECTED); |
77 WmShell::Get()->system_tray_delegate()->ShowChromeSlow(); | 77 WmShell::Get()->system_tray_controller()->ShowChromeSlow(); |
78 CloseSystemBubble(); | 78 CloseSystemBubble(); |
79 return true; | 79 return true; |
80 } | 80 } |
81 | 81 |
82 views::ImageView* image_; | 82 views::ImageView* image_; |
83 views::Label* label_; | 83 views::Label* label_; |
84 | 84 |
85 DISALLOW_COPY_AND_ASSIGN(DefaultTracingView); | 85 DISALLOW_COPY_AND_ASSIGN(DefaultTracingView); |
86 }; | 86 }; |
87 | 87 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 default_ = NULL; | 125 default_ = NULL; |
126 } | 126 } |
127 | 127 |
128 void TrayTracing::DestroyDetailedView() {} | 128 void TrayTracing::DestroyDetailedView() {} |
129 | 129 |
130 void TrayTracing::OnTracingModeChanged(bool value) { | 130 void TrayTracing::OnTracingModeChanged(bool value) { |
131 SetTrayIconVisible(value); | 131 SetTrayIconVisible(value); |
132 } | 132 } |
133 | 133 |
134 } // namespace ash | 134 } // namespace ash |
OLD | NEW |