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

Side by Side Diff: ash/accelerators/accelerator_controller_unittest.cc

Issue 10825264: Consolidate volume control code. (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 | « no previous file | ash/system/audio/tray_volume.h » ('j') | ash/system/tray/system_tray_item.h » ('J')
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/accelerators/accelerator_controller.h" 5 #include "ash/accelerators/accelerator_controller.h"
6 #include "ash/accelerators/accelerator_table.h" 6 #include "ash/accelerators/accelerator_table.h"
7 #include "ash/caps_lock_delegate.h" 7 #include "ash/caps_lock_delegate.h"
8 #include "ash/ime_control_delegate.h" 8 #include "ash/ime_control_delegate.h"
9 #include "ash/screenshot_delegate.h" 9 #include "ash/screenshot_delegate.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 last_accelerator_ = accelerator; 137 last_accelerator_ = accelerator;
138 return consume_; 138 return consume_;
139 } 139 }
140 virtual bool HandleVolumeUp(const ui::Accelerator& accelerator) OVERRIDE { 140 virtual bool HandleVolumeUp(const ui::Accelerator& accelerator) OVERRIDE {
141 ++handle_volume_up_count_; 141 ++handle_volume_up_count_;
142 last_accelerator_ = accelerator; 142 last_accelerator_ = accelerator;
143 return consume_; 143 return consume_;
144 } 144 }
145 virtual void SetVolumePercent(double percent) OVERRIDE { 145 virtual void SetVolumePercent(double percent) OVERRIDE {
146 } 146 }
147 virtual bool IsAudioMuted() const OVERRIDE {
148 return false;
149 }
150 virtual void SetAudioMuted(bool muted) OVERRIDE {
151 }
152 virtual float GetVolumeLevel() const OVERRIDE {
153 return 0.0;
154 }
155 virtual void SetVolumeLevel(float level) OVERRIDE {
156 }
147 157
148 int handle_volume_mute_count() const { 158 int handle_volume_mute_count() const {
149 return handle_volume_mute_count_; 159 return handle_volume_mute_count_;
150 } 160 }
151 int handle_volume_down_count() const { 161 int handle_volume_down_count() const {
152 return handle_volume_down_count_; 162 return handle_volume_down_count_;
153 } 163 }
154 int handle_volume_up_count() const { 164 int handle_volume_up_count() const {
155 return handle_volume_up_count_; 165 return handle_volume_up_count_;
156 } 166 }
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 EXPECT_FALSE(GetController()->IsReservedAccelerator( 989 EXPECT_FALSE(GetController()->IsReservedAccelerator(
980 ui::Accelerator(ui::VKEY_PRINT, ui::EF_NONE))); 990 ui::Accelerator(ui::VKEY_PRINT, ui::EF_NONE)));
981 EXPECT_FALSE(GetController()->IsReservedAccelerator( 991 EXPECT_FALSE(GetController()->IsReservedAccelerator(
982 ui::Accelerator(ui::VKEY_TAB, ui::EF_NONE))); 992 ui::Accelerator(ui::VKEY_TAB, ui::EF_NONE)));
983 EXPECT_FALSE(GetController()->IsReservedAccelerator( 993 EXPECT_FALSE(GetController()->IsReservedAccelerator(
984 ui::Accelerator(ui::VKEY_A, ui::EF_NONE))); 994 ui::Accelerator(ui::VKEY_A, ui::EF_NONE)));
985 } 995 }
986 996
987 } // namespace test 997 } // namespace test
988 } // namespace ash 998 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/audio/tray_volume.h » ('j') | ash/system/tray/system_tray_item.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698