| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 image_->SetImage( | 42 image_->SetImage( |
| 43 bundle.GetImageNamed(IDR_AURA_UBER_TRAY_TRACING).ToImageSkia()); | 43 bundle.GetImageNamed(IDR_AURA_UBER_TRAY_TRACING).ToImageSkia()); |
| 44 } | 44 } |
| 45 AddChildView(image_); | 45 AddChildView(image_); |
| 46 | 46 |
| 47 label_ = new views::Label(); | 47 label_ = new views::Label(); |
| 48 label_->SetMultiLine(true); | 48 label_->SetMultiLine(true); |
| 49 label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 49 label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 50 label_->SetText(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_TRACING)); | 50 label_->SetText(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_TRACING)); |
| 51 AddChildView(label_); | 51 AddChildView(label_); |
| 52 |
| 53 if (MaterialDesignController::IsSystemTrayMenuMaterial()) |
| 54 SetInkDropMode(InkDropHostView::InkDropMode::ON); |
| 52 } | 55 } |
| 53 | 56 |
| 54 ~DefaultTracingView() override {} | 57 ~DefaultTracingView() override {} |
| 55 | 58 |
| 56 private: | 59 private: |
| 57 // ActionableView: | 60 // ActionableView: |
| 58 void OnNativeThemeChanged(const ui::NativeTheme* theme) override { | 61 void OnNativeThemeChanged(const ui::NativeTheme* theme) override { |
| 59 ActionableView::OnNativeThemeChanged(theme); | 62 ActionableView::OnNativeThemeChanged(theme); |
| 60 | 63 |
| 61 if (!MaterialDesignController::IsSystemTrayMenuMaterial()) | 64 if (!MaterialDesignController::IsSystemTrayMenuMaterial()) |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 default_ = NULL; | 128 default_ = NULL; |
| 126 } | 129 } |
| 127 | 130 |
| 128 void TrayTracing::DestroyDetailedView() {} | 131 void TrayTracing::DestroyDetailedView() {} |
| 129 | 132 |
| 130 void TrayTracing::OnTracingModeChanged(bool value) { | 133 void TrayTracing::OnTracingModeChanged(bool value) { |
| 131 SetTrayIconVisible(value); | 134 SetTrayIconVisible(value); |
| 132 } | 135 } |
| 133 | 136 |
| 134 } // namespace ash | 137 } // namespace ash |
| OLD | NEW |