| 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/system/tray_tracing.h" | 5 #include "ash/system/tray_tracing.h" |
| 6 | 6 |
| 7 #include "ash/metrics/user_metrics_action.h" | 7 #include "ash/metrics/user_metrics_action.h" |
| 8 #include "ash/resources/vector_icons/vector_icons.h" | 8 #include "ash/resources/vector_icons/vector_icons.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_port.h" |
| 10 #include "ash/strings/grit/ash_strings.h" | 11 #include "ash/strings/grit/ash_strings.h" |
| 11 #include "ash/system/tray/actionable_view.h" | 12 #include "ash/system/tray/actionable_view.h" |
| 12 #include "ash/system/tray/fixed_sized_image_view.h" | 13 #include "ash/system/tray/fixed_sized_image_view.h" |
| 13 #include "ash/system/tray/system_tray.h" | 14 #include "ash/system/tray/system_tray.h" |
| 14 #include "ash/system/tray/system_tray_controller.h" | 15 #include "ash/system/tray/system_tray_controller.h" |
| 15 #include "ash/system/tray/system_tray_notifier.h" | 16 #include "ash/system/tray/system_tray_notifier.h" |
| 16 #include "ash/system/tray/tray_constants.h" | 17 #include "ash/system/tray/tray_constants.h" |
| 17 #include "ash/system/tray/tray_popup_item_style.h" | 18 #include "ash/system/tray/tray_popup_item_style.h" |
| 18 #include "ash/system/tray/tray_popup_utils.h" | 19 #include "ash/system/tray/tray_popup_utils.h" |
| 19 #include "ash/system/tray/tri_view.h" | 20 #include "ash/system/tray/tri_view.h" |
| 20 #include "ash/wm_shell.h" | |
| 21 #include "ui/base/l10n/l10n_util.h" | 21 #include "ui/base/l10n/l10n_util.h" |
| 22 #include "ui/gfx/image/image.h" | 22 #include "ui/gfx/image/image.h" |
| 23 #include "ui/gfx/paint_vector_icon.h" | 23 #include "ui/gfx/paint_vector_icon.h" |
| 24 #include "ui/views/controls/image_view.h" | 24 #include "ui/views/controls/image_view.h" |
| 25 #include "ui/views/controls/label.h" | 25 #include "ui/views/controls/label.h" |
| 26 #include "ui/views/layout/fill_layout.h" | 26 #include "ui/views/layout/fill_layout.h" |
| 27 | 27 |
| 28 namespace ash { | 28 namespace ash { |
| 29 namespace tray { | 29 namespace tray { |
| 30 | 30 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 49 image->SetImage( | 49 image->SetImage( |
| 50 gfx::CreateVectorIcon(kSystemMenuTracingIcon, style.GetIconColor())); | 50 gfx::CreateVectorIcon(kSystemMenuTracingIcon, style.GetIconColor())); |
| 51 | 51 |
| 52 SetInkDropMode(InkDropHostView::InkDropMode::ON); | 52 SetInkDropMode(InkDropHostView::InkDropMode::ON); |
| 53 } | 53 } |
| 54 | 54 |
| 55 ~DefaultTracingView() override {} | 55 ~DefaultTracingView() override {} |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 bool PerformAction(const ui::Event& event) override { | 58 bool PerformAction(const ui::Event& event) override { |
| 59 WmShell::Get()->RecordUserMetricsAction( | 59 ShellPort::Get()->RecordUserMetricsAction( |
| 60 UMA_STATUS_AREA_TRACING_DEFAULT_SELECTED); | 60 UMA_STATUS_AREA_TRACING_DEFAULT_SELECTED); |
| 61 Shell::Get()->system_tray_controller()->ShowChromeSlow(); | 61 Shell::Get()->system_tray_controller()->ShowChromeSlow(); |
| 62 CloseSystemBubble(); | 62 CloseSystemBubble(); |
| 63 return true; | 63 return true; |
| 64 } | 64 } |
| 65 | 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(DefaultTracingView); | 66 DISALLOW_COPY_AND_ASSIGN(DefaultTracingView); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace tray | 69 } // namespace tray |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 default_ = NULL; | 106 default_ = NULL; |
| 107 } | 107 } |
| 108 | 108 |
| 109 void TrayTracing::DestroyDetailedView() {} | 109 void TrayTracing::DestroyDetailedView() {} |
| 110 | 110 |
| 111 void TrayTracing::OnTracingModeChanged(bool value) { | 111 void TrayTracing::OnTracingModeChanged(bool value) { |
| 112 SetTrayIconVisible(value); | 112 SetTrayIconVisible(value); |
| 113 } | 113 } |
| 114 | 114 |
| 115 } // namespace ash | 115 } // namespace ash |
| OLD | NEW |