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

Side by Side Diff: ui/base/accelerators/accelerator_history.cc

Issue 2187703003: Wires up registering accelerators from mash with the wm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 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
« no previous file with comments | « ash/shell.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/accelerators/accelerator_history.h" 5 #include "ui/base/accelerators/accelerator_history.h"
6
6 #include "ui/events/event_constants.h" 7 #include "ui/events/event_constants.h"
7 8
8 namespace ui { 9 namespace ui {
9 10
10 // ---------------------------------------------------------------------- 11 // ----------------------------------------------------------------------
11 // Public Methods 12 // Public Methods
12 // ---------------------------------------------------------------------- 13 // ----------------------------------------------------------------------
13 14
14 AcceleratorHistory::AcceleratorHistory() 15 AcceleratorHistory::AcceleratorHistory()
15 : current_accelerator_(), 16 : current_accelerator_(),
16 previous_accelerator_() { 17 previous_accelerator_() {
17 } 18 }
18 19
19 AcceleratorHistory::~AcceleratorHistory() { 20 AcceleratorHistory::~AcceleratorHistory() {
20 } 21 }
21 22
22 void AcceleratorHistory::StoreCurrentAccelerator( 23 void AcceleratorHistory::StoreCurrentAccelerator(
23 const Accelerator& accelerator) { 24 const Accelerator& accelerator) {
24 if (accelerator != current_accelerator_) { 25 if (accelerator != current_accelerator_) {
25 previous_accelerator_ = current_accelerator_; 26 previous_accelerator_ = current_accelerator_;
26 current_accelerator_ = accelerator; 27 current_accelerator_ = accelerator;
27 } 28 }
28 } 29 }
29 30
30 } // namespace ui 31 } // namespace ui
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698