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

Unified Diff: ash/system/audio/tray_volume.cc

Issue 10269017: Remove scoped_ptr for system tray views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/audio/tray_volume.h ('k') | ash/system/bluetooth/tray_bluetooth.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/audio/tray_volume.cc
diff --git a/ash/system/audio/tray_volume.cc b/ash/system/audio/tray_volume.cc
index bd7606cc6539d790c4435ce03e04848b117fbcf1..f1765e3531e8c1134a5e0b1de250e92e7200a5c0 100644
--- a/ash/system/audio/tray_volume.cc
+++ b/ash/system/audio/tray_volume.cc
@@ -159,6 +159,7 @@ class VolumeView : public views::View,
TrayVolume::TrayVolume()
: TrayImageItem(IDR_AURA_UBER_TRAY_VOLUME_MUTE),
+ volume_view_(NULL),
is_default_view_(false) {
}
@@ -170,32 +171,32 @@ bool TrayVolume::GetInitialVisibility() {
}
views::View* TrayVolume::CreateDefaultView(user::LoginStatus status) {
- volume_view_.reset(new tray::VolumeView);
+ volume_view_ = new tray::VolumeView;
is_default_view_ = true;
- return volume_view_.get();
+ return volume_view_;
}
views::View* TrayVolume::CreateDetailedView(user::LoginStatus status) {
- volume_view_.reset(new tray::VolumeView);
+ volume_view_ = new tray::VolumeView;
is_default_view_ = false;
- return volume_view_.get();
+ return volume_view_;
}
void TrayVolume::DestroyDefaultView() {
if (is_default_view_)
- volume_view_.reset();
+ volume_view_ = NULL;
}
void TrayVolume::DestroyDetailedView() {
if (!is_default_view_)
- volume_view_.reset();
+ volume_view_ = NULL;
}
void TrayVolume::OnVolumeChanged(float percent) {
if (tray_view())
tray_view()->SetVisible(GetInitialVisibility());
- if (volume_view_.get()) {
+ if (volume_view_) {
volume_view_->SetVolumeLevel(percent);
SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds);
return;
« no previous file with comments | « ash/system/audio/tray_volume.h ('k') | ash/system/bluetooth/tray_bluetooth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698