Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / base / accelerators / accelerator_history.cc
blob3c8821d875851c1faaa50b1717c4b38b201c9b58
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
3 // found in the LICENSE file.
5 #include "ui/base/accelerators/accelerator_history.h"
6 #include "ui/events/event_constants.h"
8 namespace ui {
10 // ----------------------------------------------------------------------
11 // Public Methods
12 // ----------------------------------------------------------------------
14 AcceleratorHistory::AcceleratorHistory()
15 : current_accelerator_(),
16 previous_accelerator_() {
19 AcceleratorHistory::~AcceleratorHistory() {
22 void AcceleratorHistory::StoreCurrentAccelerator(
23 const Accelerator& accelerator) {
24 if (accelerator != current_accelerator_) {
25 previous_accelerator_ = current_accelerator_;
26 current_accelerator_ = accelerator;
30 } // namespace ui