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

Side by Side Diff: ui/wm/core/accelerator_filter.h

Issue 1117173003: Converting (Alt+LeftClick -> RightClick) to (Search+LeftClick -> RightClick) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a test case for ignoring synthesized mouse events. Created 5 years, 7 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 | « ui/base/accelerators/accelerator_history.h ('k') | ui/wm/core/accelerator_filter.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 UI_WM_CORE_ACCELERATOR_FILTER_H_ 5 #ifndef UI_WM_CORE_ACCELERATOR_FILTER_H_
6 #define UI_WM_CORE_ACCELERATOR_FILTER_H_ 6 #define UI_WM_CORE_ACCELERATOR_FILTER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/events/event_handler.h" 10 #include "ui/events/event_handler.h"
(...skipping 10 matching lines...) Expand all
21 // AcceleratorFilter filters key events for AcceleratorControler handling global 21 // AcceleratorFilter filters key events for AcceleratorControler handling global
22 // keyboard accelerators. 22 // keyboard accelerators.
23 class WM_EXPORT AcceleratorFilter : public ui::EventHandler { 23 class WM_EXPORT AcceleratorFilter : public ui::EventHandler {
24 public: 24 public:
25 // AcceleratorFilter doesn't own |accelerator_history|, it's owned by 25 // AcceleratorFilter doesn't own |accelerator_history|, it's owned by
26 // AcceleratorController. 26 // AcceleratorController.
27 AcceleratorFilter(scoped_ptr<AcceleratorDelegate> delegate, 27 AcceleratorFilter(scoped_ptr<AcceleratorDelegate> delegate,
28 ui::AcceleratorHistory* accelerator_history); 28 ui::AcceleratorHistory* accelerator_history);
29 ~AcceleratorFilter() override; 29 ~AcceleratorFilter() override;
30 30
31 // Overridden from ui::EventHandler: 31 // ui::EventHandler:
32 void OnKeyEvent(ui::KeyEvent* event) override; 32 void OnKeyEvent(ui::KeyEvent* event) override;
33 void OnMouseEvent(ui::MouseEvent* event) override;
33 34
34 private: 35 private:
35 scoped_ptr<AcceleratorDelegate> delegate_; 36 scoped_ptr<AcceleratorDelegate> delegate_;
36 ui::AcceleratorHistory* accelerator_history_; 37 ui::AcceleratorHistory* accelerator_history_;
37 38
38 DISALLOW_COPY_AND_ASSIGN(AcceleratorFilter); 39 DISALLOW_COPY_AND_ASSIGN(AcceleratorFilter);
39 }; 40 };
40 41
41 ui::Accelerator CreateAcceleratorFromKeyEvent(const ui::KeyEvent& key_event); 42 ui::Accelerator CreateAcceleratorFromKeyEvent(const ui::KeyEvent& key_event);
42 43
43 } // namespace wm 44 } // namespace wm
44 45
45 #endif // UI_WM_CORE_ACCELERATOR_FILTER_H_ 46 #endif // UI_WM_CORE_ACCELERATOR_FILTER_H_
OLDNEW
« no previous file with comments | « ui/base/accelerators/accelerator_history.h ('k') | ui/wm/core/accelerator_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698