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(scoped_ptr<::wm::NativeCursorManager> delegate) | 17 CursorManager::CursorManager( |
| 18 std::unique_ptr<::wm::NativeCursorManager> delegate) |
18 : ::wm::CursorManager(std::move(delegate)) {} | 19 : ::wm::CursorManager(std::move(delegate)) {} |
19 | 20 |
20 CursorManager::~CursorManager() { | 21 CursorManager::~CursorManager() { |
21 } | 22 } |
22 | 23 |
23 bool CursorManager::ShouldHideCursorOnKeyEvent( | 24 bool CursorManager::ShouldHideCursorOnKeyEvent( |
24 const ui::KeyEvent& event) const { | 25 const ui::KeyEvent& event) const { |
25 if (event.type() != ui::ET_KEY_PRESSED) | 26 if (event.type() != ui::ET_KEY_PRESSED) |
26 return false; | 27 return false; |
27 | 28 |
(...skipping 22 matching lines...) Expand all Loading... |
50 case ui::VKEY_BRIGHTNESS_DOWN: | 51 case ui::VKEY_BRIGHTNESS_DOWN: |
51 case ui::VKEY_BRIGHTNESS_UP: | 52 case ui::VKEY_BRIGHTNESS_UP: |
52 case ui::VKEY_KBD_BRIGHTNESS_UP: | 53 case ui::VKEY_KBD_BRIGHTNESS_UP: |
53 case ui::VKEY_KBD_BRIGHTNESS_DOWN: | 54 case ui::VKEY_KBD_BRIGHTNESS_DOWN: |
54 return false; | 55 return false; |
55 default: | 56 default: |
56 return true; | 57 return true; |
57 } | 58 } |
58 } | 59 } |
59 } // namespace ash | 60 } // namespace ash |
OLD | NEW |