OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/ui/ash/palette_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/palette_delegate_chromeos.h" |
6 | 6 |
| 7 #include "ash/shell.h" |
| 8 |
7 namespace chromeos { | 9 namespace chromeos { |
8 | 10 |
9 PaletteDelegateChromeOS::PaletteDelegateChromeOS() {} | 11 PaletteDelegateChromeOS::PaletteDelegateChromeOS() {} |
10 | 12 |
11 PaletteDelegateChromeOS::~PaletteDelegateChromeOS() {} | 13 PaletteDelegateChromeOS::~PaletteDelegateChromeOS() {} |
12 | 14 |
| 15 void PaletteDelegateChromeOS::OnLaserPointerEnabled() { |
| 16 // We lock the cursor after we hide it because compound_event_filter.cc will |
| 17 // attempt to call ShowCursor every time it recieves a mouse event. |
| 18 ash::Shell::GetInstance()->cursor_manager()->HideCursor(); |
| 19 ash::Shell::GetInstance()->cursor_manager()->LockCursor(); |
| 20 } |
| 21 |
| 22 void PaletteDelegateChromeOS::OnLaserPointerDisabled() { |
| 23 ash::Shell::GetInstance()->cursor_manager()->UnlockCursor(); |
| 24 ash::Shell::GetInstance()->cursor_manager()->ShowCursor(); |
| 25 } |
13 } // namespace chromeos | 26 } // namespace chromeos |
OLD | NEW |