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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 proxy_screenshot_delegate_.get(), false /* draw_overlay_immediately */); | 215 proxy_screenshot_delegate_.get(), false /* draw_overlay_immediately */); |
216 } | 216 } |
217 | 217 |
218 void PaletteDelegateChromeOS::CancelPartialScreenshot() { | 218 void PaletteDelegateChromeOS::CancelPartialScreenshot() { |
219 ash::Shell::GetInstance()->screenshot_controller()->CancelScreenshotSession(); | 219 ash::Shell::GetInstance()->screenshot_controller()->CancelScreenshotSession(); |
220 } | 220 } |
221 | 221 |
222 void PaletteDelegateChromeOS::OnStylusStateChanged(ui::StylusState state) { | 222 void PaletteDelegateChromeOS::OnStylusStateChanged(ui::StylusState state) { |
223 on_stylus_state_changed_.Run(state); | 223 on_stylus_state_changed_.Run(state); |
224 } | 224 } |
225 | |
226 void PaletteDelegateChromeOS::OnLaserPointerEnabled() { | |
227 // We lock the cursor after we hide it because compound_event_filter.cc will | |
228 // attempt to call ShowCursor every time it recieves a mouse event. | |
229 ash::Shell::GetInstance()->cursor_manager()->HideCursor(); | |
230 ash::Shell::GetInstance()->cursor_manager()->LockCursor(); | |
231 } | |
232 | |
233 void PaletteDelegateChromeOS::OnLaserPointerDisabled() { | |
234 ash::Shell::GetInstance()->cursor_manager()->UnlockCursor(); | |
235 ash::Shell::GetInstance()->cursor_manager()->ShowCursor(); | |
236 } | |
237 } // namespace chromeos | 225 } // namespace chromeos |
OLD | NEW |