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/accelerators/accelerator_controller_delegate_aura.h" | 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
8 #include "ash/common/system/chromeos/palette/palette_utils.h" | 8 #include "ash/common/system/chromeos/palette/palette_utils.h" |
9 #include "ash/magnifier/partial_magnification_controller.h" | 9 #include "ash/magnifier/partial_magnification_controller.h" |
10 #include "ash/screenshot_delegate.h" | 10 #include "ash/screenshot_delegate.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 165 |
166 screenshot_controller->set_pen_events_only(true); | 166 screenshot_controller->set_pen_events_only(true); |
167 screenshot_controller->StartPartialScreenshotSession( | 167 screenshot_controller->StartPartialScreenshotSession( |
168 screenshot_delegate, false /* draw_overlay_immediately */); | 168 screenshot_delegate, false /* draw_overlay_immediately */); |
169 } | 169 } |
170 | 170 |
171 void PaletteDelegateChromeOS::OnStylusStateChanged(ui::StylusState state) { | 171 void PaletteDelegateChromeOS::OnStylusStateChanged(ui::StylusState state) { |
172 on_stylus_state_changed_.Run(state); | 172 on_stylus_state_changed_.Run(state); |
173 } | 173 } |
174 | 174 |
| 175 void PaletteDelegateChromeOS::OnLaserPointerEnabled() { |
| 176 // We lock the cursor after we hide it because compound_event_filter.cc will |
| 177 // attempt to call ShowCursor every time it recieves a mouse event. |
| 178 ash::Shell::GetInstance()->cursor_manager()->HideCursor(); |
| 179 ash::Shell::GetInstance()->cursor_manager()->LockCursor(); |
| 180 } |
| 181 |
| 182 void PaletteDelegateChromeOS::OnLaserPointerDisabled() { |
| 183 ash::Shell::GetInstance()->cursor_manager()->UnlockCursor(); |
| 184 ash::Shell::GetInstance()->cursor_manager()->ShowCursor(); |
| 185 } |
175 } // namespace chromeos | 186 } // namespace chromeos |
OLD | NEW |