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

Side by Side Diff: ash/accelerators/accelerator_delegate.h

Issue 2147013003: Mark POWER key as system key so that it won't be passed to regular apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 4 years, 5 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 | « no previous file | ash/accelerators/accelerator_delegate.cc » ('j') | 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 #ifndef ASH_ACCELERATORS_ACCELERATOR_DELEGATE_H_ 5 #ifndef ASH_ACCELERATORS_ACCELERATOR_DELEGATE_H_
6 #define ASH_ACCELERATORS_ACCELERATOR_DELEGATE_H_ 6 #define ASH_ACCELERATORS_ACCELERATOR_DELEGATE_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/wm/core/accelerator_delegate.h" 11 #include "ui/wm/core/accelerator_delegate.h"
12 12
13 namespace ash { 13 namespace ash {
14 14
15 class ASH_EXPORT AcceleratorDelegate 15 class ASH_EXPORT AcceleratorDelegate
16 : NON_EXPORTED_BASE(public ::wm::AcceleratorDelegate) { 16 : NON_EXPORTED_BASE(public ::wm::AcceleratorDelegate) {
17 public: 17 public:
18 AcceleratorDelegate(); 18 AcceleratorDelegate();
19 ~AcceleratorDelegate() override; 19 ~AcceleratorDelegate() override;
20 20
21 // wm::AcceleratorDelegate: 21 // wm::AcceleratorDelegate:
22 bool ProcessAccelerator(const ui::KeyEvent& event, 22 bool ProcessAccelerator(const ui::KeyEvent& event,
23 const ui::Accelerator& accelerator, 23 const ui::Accelerator& accelerator) override;
24 KeyType key_type) override;
25 24
26 private: 25 private:
27 // Returns true if the window should be allowed a chance to handle 26 // Returns true if the window should be allowed a chance to handle
28 // system keys. 27 // system keys.
29 bool CanConsumeSystemKeys(const ui::KeyEvent& event); 28 bool CanConsumeSystemKeys(const ui::KeyEvent& event);
30 29
31 bool ShouldProcessAcceleratorNow(const ui::KeyEvent& event, 30 bool ShouldProcessAcceleratorNow(const ui::KeyEvent& event,
32 const ui::Accelerator& accelerator); 31 const ui::Accelerator& accelerator);
33 32
34 DISALLOW_COPY_AND_ASSIGN(AcceleratorDelegate); 33 DISALLOW_COPY_AND_ASSIGN(AcceleratorDelegate);
35 }; 34 };
36 35
37 } // namespace ash 36 } // namespace ash
38 37
39 #endif // ASH_ACCELERATORS_ACCELERATOR_DELEGATE_H_ 38 #endif // ASH_ACCELERATORS_ACCELERATOR_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | ash/accelerators/accelerator_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698