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 #include "ash/wm/cursor_manager_chromeos.h" | 5 #include "ash/wm/cursor_manager_chromeos.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
11 #include "ui/keyboard/keyboard_util.h" | 11 #include "ui/keyboard/keyboard_util.h" |
12 #include "ui/wm/core/cursor_manager.h" | 12 #include "ui/wm/core/cursor_manager.h" |
13 #include "ui/wm/core/native_cursor_manager.h" | 13 #include "ui/wm/core/native_cursor_manager.h" |
14 | 14 |
15 namespace ash { | 15 namespace ash { |
16 | 16 |
17 CursorManager::CursorManager( | 17 CursorManager::CursorManager( |
18 std::unique_ptr<::wm::NativeCursorManager> delegate) | 18 std::unique_ptr<::wm::NativeCursorManager> delegate) |
19 : ::wm::CursorManager(std::move(delegate)) {} | 19 : ::wm::CursorManager(std::move(delegate)) {} |
20 | 20 |
21 CursorManager::~CursorManager() { | 21 CursorManager::~CursorManager() {} |
22 } | |
23 | 22 |
24 bool CursorManager::ShouldHideCursorOnKeyEvent( | 23 bool CursorManager::ShouldHideCursorOnKeyEvent( |
25 const ui::KeyEvent& event) const { | 24 const ui::KeyEvent& event) const { |
26 if (event.type() != ui::ET_KEY_PRESSED) | 25 if (event.type() != ui::ET_KEY_PRESSED) |
27 return false; | 26 return false; |
28 | 27 |
29 // Clicking on a key when the accessibility virtual keyboard is enabled should | 28 // Clicking on a key when the accessibility virtual keyboard is enabled should |
30 // not hide the cursor. | 29 // not hide the cursor. |
31 if (keyboard::GetAccessibilityKeyboardEnabled()) | 30 if (keyboard::GetAccessibilityKeyboardEnabled()) |
32 return false; | 31 return false; |
(...skipping 18 matching lines...) Expand all Loading... |
51 case ui::VKEY_BRIGHTNESS_DOWN: | 50 case ui::VKEY_BRIGHTNESS_DOWN: |
52 case ui::VKEY_BRIGHTNESS_UP: | 51 case ui::VKEY_BRIGHTNESS_UP: |
53 case ui::VKEY_KBD_BRIGHTNESS_UP: | 52 case ui::VKEY_KBD_BRIGHTNESS_UP: |
54 case ui::VKEY_KBD_BRIGHTNESS_DOWN: | 53 case ui::VKEY_KBD_BRIGHTNESS_DOWN: |
55 return false; | 54 return false; |
56 default: | 55 default: |
57 return true; | 56 return true; |
58 } | 57 } |
59 } | 58 } |
60 } // namespace ash | 59 } // namespace ash |
OLD | NEW |