| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ash/test/test_volume_control_delegate.h" | |
| 6 | |
| 7 namespace ash { | |
| 8 | |
| 9 TestVolumeControlDelegate::TestVolumeControlDelegate(bool consume) | |
| 10 : consume_(consume), | |
| 11 handle_volume_mute_count_(0), | |
| 12 handle_volume_down_count_(0), | |
| 13 handle_volume_up_count_(0) { | |
| 14 } | |
| 15 | |
| 16 TestVolumeControlDelegate::~TestVolumeControlDelegate() { | |
| 17 } | |
| 18 | |
| 19 bool TestVolumeControlDelegate::HandleVolumeMute( | |
| 20 const ui::Accelerator& accelerator) { | |
| 21 ++handle_volume_mute_count_; | |
| 22 last_accelerator_ = accelerator; | |
| 23 return consume_; | |
| 24 } | |
| 25 | |
| 26 bool TestVolumeControlDelegate::HandleVolumeDown( | |
| 27 const ui::Accelerator& accelerator) { | |
| 28 ++handle_volume_down_count_; | |
| 29 last_accelerator_ = accelerator; | |
| 30 return consume_; | |
| 31 } | |
| 32 | |
| 33 bool TestVolumeControlDelegate::HandleVolumeUp( | |
| 34 const ui::Accelerator& accelerator) { | |
| 35 ++handle_volume_up_count_; | |
| 36 last_accelerator_ = accelerator; | |
| 37 return consume_; | |
| 38 } | |
| 39 | |
| 40 } // namespace ash | |
| OLD | NEW |