| Index: media/base/keyboard_event_counter.cc
|
| diff --git a/media/base/keyboard_event_counter.cc b/media/base/keyboard_event_counter.cc
|
| index 8432aec37e38171d0dd1ef24057d91a6af8d0dfd..7c761c16d01242a9dc632ed28a95caf4b1e294e0 100644
|
| --- a/media/base/keyboard_event_counter.cc
|
| +++ b/media/base/keyboard_event_counter.cc
|
| @@ -19,17 +19,16 @@ void KeyboardEventCounter::Reset() {
|
| reinterpret_cast<base::subtle::AtomicWord*>(&total_key_presses_), 0);
|
| }
|
|
|
| -void KeyboardEventCounter::OnKeyboardEvent(ui::EventType event,
|
| +void KeyboardEventCounter::OnKeyboardEvent(bool down,
|
| ui::KeyboardCode key_code) {
|
| // Updates the pressed keys and the total count of key presses.
|
| - if (event == ui::ET_KEY_PRESSED) {
|
| + if (down) {
|
| if (pressed_keys_.find(key_code) != pressed_keys_.end())
|
| return;
|
| pressed_keys_.insert(key_code);
|
| base::subtle::NoBarrier_AtomicIncrement(
|
| reinterpret_cast<base::subtle::AtomicWord*>(&total_key_presses_), 1);
|
| } else {
|
| - DCHECK_EQ(ui::ET_KEY_RELEASED, event);
|
| pressed_keys_.erase(key_code);
|
| }
|
| }
|
|
|