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

Side by Side Diff: ash/common/key_event_watcher.cc

Issue 2330403002: Do not activate system tray bubble by default (Closed)
Patch Set: Do not activate system tray bubble Created 4 years, 3 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 2016 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/common/key_event_watcher.h"
6
7 namespace ash {
8
9 KeyEventWatcher::KeyEventWatcher() {}
10 KeyEventWatcher::~KeyEventWatcher() {}
James Cook 2016/09/22 21:17:16 nit: blank line above
oshima 2016/09/23 09:37:19 Done.
11
12 void KeyEventWatcher::AddKeyEventCallback(const ui::Accelerator& key,
13 const KeyEventCallback& callback) {
14 callback_map_.insert(std::make_pair(key, callback));
15 }
16
17 bool KeyEventWatcher::HandleKeyEvent(const ui::KeyEvent& event) {
18 auto iter = callback_map_.find(ui::Accelerator(event));
19 if (iter != callback_map_.end()) {
20 iter->second.Run(event);
21 return true;
22 }
23 return false;
24 }
25
26 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698