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

Side by Side Diff: ash/system/chromeos/audio/tray_audio_chromeos.cc

Issue 2099443002: Migrate simple ash Shell metrics users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win compile error. 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
« no previous file with comments | « ash/system/cast/tray_cast.cc ('k') | ash/system/chromeos/bluetooth/tray_bluetooth.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/audio/tray_audio_chromeos.h" 5 #include "ash/system/chromeos/audio/tray_audio_chromeos.h"
6 6
7 #include "ash/common/system/audio/volume_view.h" 7 #include "ash/common/system/audio/volume_view.h"
8 #include "ash/metrics/user_metrics_recorder.h" 8 #include "ash/common/wm_shell.h"
9 #include "ash/shell.h"
10 #include "ash/system/chromeos/audio/audio_detailed_view.h" 9 #include "ash/system/chromeos/audio/audio_detailed_view.h"
11 #include "ash/system/chromeos/audio/tray_audio_delegate_chromeos.h" 10 #include "ash/system/chromeos/audio/tray_audio_delegate_chromeos.h"
12 #include "chromeos/dbus/dbus_thread_manager.h" 11 #include "chromeos/dbus/dbus_thread_manager.h"
13 #include "ui/views/view.h" 12 #include "ui/views/view.h"
14 13
15 namespace ash { 14 namespace ash {
16 15
17 using system::TrayAudioDelegate; 16 using system::TrayAudioDelegate;
18 using system::TrayAudioDelegateChromeOs; 17 using system::TrayAudioDelegateChromeOs;
19 18
(...skipping 16 matching lines...) Expand all
36 35
37 if (audio_detail_view_) 36 if (audio_detail_view_)
38 audio_detail_view_->Update(); 37 audio_detail_view_->Update();
39 } 38 }
40 39
41 views::View* TrayAudioChromeOs::CreateDetailedView(LoginStatus status) { 40 views::View* TrayAudioChromeOs::CreateDetailedView(LoginStatus status) {
42 if (pop_up_volume_view_) { 41 if (pop_up_volume_view_) {
43 volume_view_ = new tray::VolumeView(this, audio_delegate_.get(), false); 42 volume_view_ = new tray::VolumeView(this, audio_delegate_.get(), false);
44 return volume_view_; 43 return volume_view_;
45 } else { 44 } else {
46 Shell::GetInstance()->metrics()->RecordUserMetricsAction( 45 WmShell::Get()->RecordUserMetricsAction(
47 ash::UMA_STATUS_AREA_DETAILED_AUDIO_VIEW); 46 UMA_STATUS_AREA_DETAILED_AUDIO_VIEW);
48 audio_detail_view_ = new tray::AudioDetailedView(this); 47 audio_detail_view_ = new tray::AudioDetailedView(this);
49 return audio_detail_view_; 48 return audio_detail_view_;
50 } 49 }
51 } 50 }
52 51
53 void TrayAudioChromeOs::DestroyDetailedView() { 52 void TrayAudioChromeOs::DestroyDetailedView() {
54 if (audio_detail_view_) { 53 if (audio_detail_view_) {
55 audio_detail_view_ = NULL; 54 audio_detail_view_ = NULL;
56 } else if (volume_view_) { 55 } else if (volume_view_) {
57 volume_view_ = NULL; 56 volume_view_ = NULL;
(...skipping 28 matching lines...) Expand all
86 } 85 }
87 86
88 void TrayAudioChromeOs::SuspendDone(const base::TimeDelta& sleep_duration) { 87 void TrayAudioChromeOs::SuspendDone(const base::TimeDelta& sleep_duration) {
89 // This event is triggered when the device resumes after earlier suspension, 88 // This event is triggered when the device resumes after earlier suspension,
90 // we should always start or re-start HDMI re-discovering 89 // we should always start or re-start HDMI re-discovering
91 // grace period right after this event. 90 // grace period right after this event.
92 audio_delegate_->SetActiveHDMIOutoutRediscoveringIfNecessary(true); 91 audio_delegate_->SetActiveHDMIOutoutRediscoveringIfNecessary(true);
93 } 92 }
94 93
95 } // namespace ash 94 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/cast/tray_cast.cc ('k') | ash/system/chromeos/bluetooth/tray_bluetooth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698