Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Side by Side Diff: ash/system/chromeos/tray_tracing.cc

Issue 2058173002: mash: Move SystemTrayDelegate ownership to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review feedback Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698