Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: chrome/browser/ui/ash/palette_delegate_chromeos.cc

Issue 2361563002: chromeos: Laser tool blocks events from propagating. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/ash/palette_delegate_chromeos.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/palette_delegate_chromeos.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698