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

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

Issue 9580024: ash uber tray: Allow customizing each item depending on whether the user is logged in or not. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing file Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/audio/tray_volume.h ('k') | ash/system/brightness/tray_brightness.h » ('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 (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 "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray_delegate.h" 8 #include "ash/system/tray/system_tray_delegate.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 }; 141 };
142 142
143 } // namespace tray 143 } // namespace tray
144 144
145 TrayVolume::TrayVolume() { 145 TrayVolume::TrayVolume() {
146 } 146 }
147 147
148 TrayVolume::~TrayVolume() { 148 TrayVolume::~TrayVolume() {
149 } 149 }
150 150
151 views::View* TrayVolume::CreateTrayView() { 151 views::View* TrayVolume::CreateTrayView(user::LoginStatus status) {
152 return NULL; 152 return NULL;
153 } 153 }
154 154
155 views::View* TrayVolume::CreateDefaultView() { 155 views::View* TrayVolume::CreateDefaultView(user::LoginStatus status) {
156 volume_view_.reset(new tray::VolumeView); 156 volume_view_.reset(new tray::VolumeView);
157 return volume_view_.get(); 157 return volume_view_.get();
158 } 158 }
159 159
160 views::View* TrayVolume::CreateDetailedView() { 160 views::View* TrayVolume::CreateDetailedView(user::LoginStatus status) {
161 volume_view_.reset(new tray::VolumeView); 161 volume_view_.reset(new tray::VolumeView);
162 return volume_view_.get(); 162 return volume_view_.get();
163 } 163 }
164 164
165 void TrayVolume::DestroyTrayView() { 165 void TrayVolume::DestroyTrayView() {
166 } 166 }
167 167
168 void TrayVolume::DestroyDefaultView() { 168 void TrayVolume::DestroyDefaultView() {
169 volume_view_.reset(); 169 volume_view_.reset();
170 } 170 }
171 171
172 void TrayVolume::DestroyDetailedView() { 172 void TrayVolume::DestroyDetailedView() {
173 volume_view_.reset(); 173 volume_view_.reset();
174 } 174 }
175 175
176 void TrayVolume::OnVolumeChanged(float percent) { 176 void TrayVolume::OnVolumeChanged(float percent) {
177 if (volume_view_.get()) { 177 if (volume_view_.get()) {
178 volume_view_->SetVolumeLevel(percent); 178 volume_view_->SetVolumeLevel(percent);
179 return; 179 return;
180 } 180 }
181 181
182 PopupDetailedView(); 182 PopupDetailedView();
183 } 183 }
184 184
185 } // namespace internal 185 } // namespace internal
186 } // namespace ash 186 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/audio/tray_volume.h ('k') | ash/system/brightness/tray_brightness.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698