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

Side by Side Diff: media/audio/key_press_monitor.cc

Issue 21183002: Adding key press detection in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
OLDNEW
(Empty)
1 // Copyright (c) 2013 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 "media/audio/key_press_monitor.h"
6
7 #include "base/message_loop/message_loop_proxy.h"
8
9 namespace media {
10
11 KeyPressMonitor::KeyPressMonitor(base::MessageLoopProxy* message_loop)
DaleCurtis 2013/08/02 21:04:47 const scoped_refptr<base::MessageLoopProxy>&
jiayl 2013/08/02 21:45:45 Done.
12 : message_loop_(message_loop) {}
13
14 KeyPressMonitor::~KeyPressMonitor() {}
15
16 void KeyPressMonitor::AddKeyPressListener(KeyPressListener* listener) {
17 DCHECK(message_loop_->BelongsToCurrentThread());
18 listeners_.AddObserver(listener);
19 }
20
21 void KeyPressMonitor::RemoveKeyPressListener(KeyPressListener* listener) {
22 DCHECK(message_loop_->BelongsToCurrentThread());
23 listeners_.RemoveObserver(listener);
24 }
25
26 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698