| 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/chromeos/tray_tracing.h" | 5 #include "ash/system/chromeos/tray_tracing.h" |
| 6 | 6 |
| 7 #include "ash/common/system/tray/fixed_sized_image_view.h" | 7 #include "ash/common/system/tray/fixed_sized_image_view.h" |
| 8 #include "ash/common/system/tray/system_tray_delegate.h" | 8 #include "ash/common/system/tray/system_tray_delegate.h" |
| 9 #include "ash/common/system/tray/tray_constants.h" | 9 #include "ash/common/system/tray/tray_constants.h" |
| 10 #include "ash/common/wm_shell.h" |
| 10 #include "ash/shell.h" | 11 #include "ash/shell.h" |
| 11 #include "ash/system/tray/actionable_view.h" | 12 #include "ash/system/tray/actionable_view.h" |
| 12 #include "ash/system/tray/system_tray.h" | 13 #include "ash/system/tray/system_tray.h" |
| 13 #include "ash/system/tray/system_tray_notifier.h" | 14 #include "ash/system/tray/system_tray_notifier.h" |
| 14 #include "grit/ash_resources.h" | 15 #include "grit/ash_resources.h" |
| 15 #include "grit/ash_strings.h" | 16 #include "grit/ash_strings.h" |
| 16 #include "ui/base/resource/resource_bundle.h" | 17 #include "ui/base/resource/resource_bundle.h" |
| 17 #include "ui/gfx/image/image.h" | 18 #include "ui/gfx/image/image.h" |
| 18 #include "ui/views/controls/image_view.h" | 19 #include "ui/views/controls/image_view.h" |
| 19 #include "ui/views/controls/label.h" | 20 #include "ui/views/controls/label.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 41 label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 42 label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 42 label_->SetText(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_TRACING)); | 43 label_->SetText(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_TRACING)); |
| 43 AddChildView(label_); | 44 AddChildView(label_); |
| 44 } | 45 } |
| 45 | 46 |
| 46 ~DefaultTracingView() override {} | 47 ~DefaultTracingView() override {} |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 // Overridden from ActionableView. | 50 // Overridden from ActionableView. |
| 50 bool PerformAction(const ui::Event& event) override { | 51 bool PerformAction(const ui::Event& event) override { |
| 51 Shell::GetInstance()->system_tray_delegate()->ShowChromeSlow(); | 52 WmShell::Get()->system_tray_delegate()->ShowChromeSlow(); |
| 52 return true; | 53 return true; |
| 53 } | 54 } |
| 54 | 55 |
| 55 views::ImageView* image_; | 56 views::ImageView* image_; |
| 56 views::Label* label_; | 57 views::Label* label_; |
| 57 | 58 |
| 58 DISALLOW_COPY_AND_ASSIGN(DefaultTracingView); | 59 DISALLOW_COPY_AND_ASSIGN(DefaultTracingView); |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 } // namespace tray | 62 } // namespace tray |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 } | 101 } |
| 101 | 102 |
| 102 void TrayTracing::DestroyDetailedView() { | 103 void TrayTracing::DestroyDetailedView() { |
| 103 } | 104 } |
| 104 | 105 |
| 105 void TrayTracing::OnTracingModeChanged(bool value) { | 106 void TrayTracing::OnTracingModeChanged(bool value) { |
| 106 SetTrayIconVisible(value); | 107 SetTrayIconVisible(value); |
| 107 } | 108 } |
| 108 | 109 |
| 109 } // namespace ash | 110 } // namespace ash |
| OLD | NEW |