OLD | NEW |
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 CHROME_BROWSER_CHROMEOS_LOGIN_UI_INPUT_EVENTS_BLOCKER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_INPUT_EVENTS_BLOCKER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_INPUT_EVENTS_BLOCKER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_INPUT_EVENTS_BLOCKER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "ui/events/event_handler.h" | 9 #include "ui/events/event_handler.h" |
10 | 10 |
11 namespace chromeos { | 11 namespace chromeos { |
12 | 12 |
13 // A simple input events blocker that just makes device unresponsive. | 13 // A simple input events blocker that just makes device unresponsive. |
14 // Should be used only for a (very) short time lock as it's confusing to the | 14 // Should be used only for a (very) short time lock as it's confusing to the |
15 // user. | 15 // user. |
16 class InputEventsBlocker : public ui::EventHandler { | 16 class InputEventsBlocker : public ui::EventHandler { |
17 public: | 17 public: |
18 InputEventsBlocker(); | 18 InputEventsBlocker(); |
19 virtual ~InputEventsBlocker(); | 19 virtual ~InputEventsBlocker(); |
20 | 20 |
21 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; | 21 virtual void OnKeyEvent(ui::KeyEvent* event) override; |
22 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 22 virtual void OnMouseEvent(ui::MouseEvent* event) override; |
23 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; | 23 virtual void OnTouchEvent(ui::TouchEvent* event) override; |
24 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 24 virtual void OnGestureEvent(ui::GestureEvent* event) override; |
25 | 25 |
26 private: | 26 private: |
27 DISALLOW_COPY_AND_ASSIGN(InputEventsBlocker); | 27 DISALLOW_COPY_AND_ASSIGN(InputEventsBlocker); |
28 }; | 28 }; |
29 | 29 |
30 } // namespace chromeos | 30 } // namespace chromeos |
31 | 31 |
32 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_INPUT_EVENTS_BLOCKER_H_ | 32 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_INPUT_EVENTS_BLOCKER_H_ |
OLD | NEW |