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

Side by Side Diff: ash/system/audio/tray_volume.cc

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary forward declarations. Renamed |tray| to |owner|. Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/audio/tray_volume.h" 5 #include "ash/system/audio/tray_volume.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 VolumeButton* icon_; 207 VolumeButton* icon_;
208 MuteButton* mute_; 208 MuteButton* mute_;
209 VolumeSlider* slider_; 209 VolumeSlider* slider_;
210 210
211 DISALLOW_COPY_AND_ASSIGN(VolumeView); 211 DISALLOW_COPY_AND_ASSIGN(VolumeView);
212 }; 212 };
213 213
214 } // namespace tray 214 } // namespace tray
215 215
216 TrayVolume::TrayVolume() 216 TrayVolume::TrayVolume(SystemTray* system_tray)
217 : TrayImageItem(IDR_AURA_UBER_TRAY_VOLUME_MUTE), 217 : TrayImageItem(system_tray, IDR_AURA_UBER_TRAY_VOLUME_MUTE),
218 volume_view_(NULL), 218 volume_view_(NULL),
219 is_default_view_(false) { 219 is_default_view_(false) {
220 } 220 }
221 221
222 TrayVolume::~TrayVolume() { 222 TrayVolume::~TrayVolume() {
223 } 223 }
224 224
225 bool TrayVolume::GetInitialVisibility() { 225 bool TrayVolume::GetInitialVisibility() {
226 return IsAudioMuted(); 226 return IsAudioMuted();
227 } 227 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 tray_view()->SetVisible(GetInitialVisibility()); 271 tray_view()->SetVisible(GetInitialVisibility());
272 272
273 if (volume_view_) 273 if (volume_view_)
274 volume_view_->Update(); 274 volume_view_->Update();
275 else 275 else
276 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); 276 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false);
277 } 277 }
278 278
279 } // namespace internal 279 } // namespace internal
280 } // namespace ash 280 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698