| Index: media/audio/key_press_monitor.cc
|
| diff --git a/media/audio/key_press_monitor.cc b/media/audio/key_press_monitor.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..050bfd898dca9b04594734e123c51b49f0aa8644
|
| --- /dev/null
|
| +++ b/media/audio/key_press_monitor.cc
|
| @@ -0,0 +1,27 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "media/audio/key_press_monitor.h"
|
| +
|
| +#include "base/message_loop/message_loop_proxy.h"
|
| +
|
| +namespace media {
|
| +
|
| +KeyPressMonitor::KeyPressMonitor(
|
| + const scoped_refptr<base::MessageLoopProxy>& message_loop)
|
| + : message_loop_(message_loop) {}
|
| +
|
| +KeyPressMonitor::~KeyPressMonitor() {}
|
| +
|
| +void KeyPressMonitor::AddKeyPressListener(KeyPressListener* listener) {
|
| + DCHECK(message_loop_->BelongsToCurrentThread());
|
| + listeners_.AddObserver(listener);
|
| +}
|
| +
|
| +void KeyPressMonitor::RemoveKeyPressListener(KeyPressListener* listener) {
|
| + DCHECK(message_loop_->BelongsToCurrentThread());
|
| + listeners_.RemoveObserver(listener);
|
| +}
|
| +
|
| +} // namespace media
|
|
|