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

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

Issue 10827271: Replace views::Event with ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/shell/window_type_launcher.cc ('k') | ash/system/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 (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/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 private: 171 private:
172 // Overridden from views::View. 172 // Overridden from views::View.
173 virtual void OnBoundsChanged(const gfx::Rect& old_bounds) OVERRIDE { 173 virtual void OnBoundsChanged(const gfx::Rect& old_bounds) OVERRIDE {
174 int w = width() - slider_->x(); 174 int w = width() - slider_->x();
175 slider_->SetSize(gfx::Size(w, slider_->height())); 175 slider_->SetSize(gfx::Size(w, slider_->height()));
176 } 176 }
177 177
178 // Overridden from views::ButtonListener. 178 // Overridden from views::ButtonListener.
179 virtual void ButtonPressed(views::Button* sender, 179 virtual void ButtonPressed(views::Button* sender,
180 const views::Event& event) OVERRIDE { 180 const ui::Event& event) OVERRIDE {
181 CHECK(sender == icon_ || sender == mute_); 181 CHECK(sender == icon_ || sender == mute_);
182 ash::SystemTrayDelegate* delegate = 182 ash::SystemTrayDelegate* delegate =
183 ash::Shell::GetInstance()->tray_delegate(); 183 ash::Shell::GetInstance()->tray_delegate();
184 delegate->SetAudioMuted(!delegate->IsAudioMuted()); 184 delegate->SetAudioMuted(!delegate->IsAudioMuted());
185 } 185 }
186 186
187 // Overridden from views:SliderListener. 187 // Overridden from views:SliderListener.
188 virtual void SliderValueChanged(views::Slider* sender, 188 virtual void SliderValueChanged(views::Slider* sender,
189 float value, 189 float value,
190 float old_value, 190 float old_value,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 tray_view()->SetVisible(GetInitialVisibility()); 262 tray_view()->SetVisible(GetInitialVisibility());
263 263
264 if (volume_view_) 264 if (volume_view_)
265 volume_view_->Update(); 265 volume_view_->Update();
266 else 266 else
267 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); 267 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false);
268 } 268 }
269 269
270 } // namespace internal 270 } // namespace internal
271 } // namespace ash 271 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/window_type_launcher.cc ('k') | ash/system/bluetooth/tray_bluetooth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698