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