| 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/laser/laser_pointer_controller.h" |
| 9 #include "ash/magnifier/partial_magnification_controller.h" | 10 #include "ash/magnifier/partial_magnification_controller.h" |
| 10 #include "ash/screenshot_delegate.h" | 11 #include "ash/screenshot_delegate.h" |
| 11 #include "ash/shell.h" | 12 #include "ash/shell.h" |
| 12 #include "ash/utility/screenshot_controller.h" | 13 #include "ash/utility/screenshot_controller.h" |
| 13 #include "chrome/browser/chrome_notification_types.h" | 14 #include "chrome/browser/chrome_notification_types.h" |
| 14 #include "chrome/browser/chromeos/note_taking_app_utils.h" | 15 #include "chrome/browser/chromeos/note_taking_app_utils.h" |
| 15 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 16 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 16 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 17 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
| 18 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 proxy_screenshot_delegate_.get(), false /* draw_overlay_immediately */); | 216 proxy_screenshot_delegate_.get(), false /* draw_overlay_immediately */); |
| 216 } | 217 } |
| 217 | 218 |
| 218 void PaletteDelegateChromeOS::CancelPartialScreenshot() { | 219 void PaletteDelegateChromeOS::CancelPartialScreenshot() { |
| 219 ash::Shell::GetInstance()->screenshot_controller()->CancelScreenshotSession(); | 220 ash::Shell::GetInstance()->screenshot_controller()->CancelScreenshotSession(); |
| 220 } | 221 } |
| 221 | 222 |
| 222 void PaletteDelegateChromeOS::OnStylusStateChanged(ui::StylusState state) { | 223 void PaletteDelegateChromeOS::OnStylusStateChanged(ui::StylusState state) { |
| 223 on_stylus_state_changed_.Run(state); | 224 on_stylus_state_changed_.Run(state); |
| 224 } | 225 } |
| 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 | 226 } // namespace chromeos |
| OLD | NEW |