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

Unified Diff: chrome/browser/ui/ash/palette_delegate_chromeos.cc

Issue 2239743004: Palette tool laser prototype. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patch
Patch Set: Rebased. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/ash/palette_delegate_chromeos.h ('k') | ui/gfx/vector_icons/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/palette_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/palette_delegate_chromeos.cc b/chrome/browser/ui/ash/palette_delegate_chromeos.cc
index 8a1d2648402f454cc4d27e4854000475f7b33b04..4ccfc3ea8c92a8d95d8dd1a05f79e9c77fa77b33 100644
--- a/chrome/browser/ui/ash/palette_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/palette_delegate_chromeos.cc
@@ -172,4 +172,15 @@ void PaletteDelegateChromeOS::OnStylusStateChanged(ui::StylusState state) {
on_stylus_state_changed_.Run(state);
}
+void PaletteDelegateChromeOS::OnLaserPointerEnabled() {
+ // We lock the cursor after we hide it because compound_event_filter.cc will
+ // attempt to call ShowCursor every time it recieves a mouse event.
+ ash::Shell::GetInstance()->cursor_manager()->HideCursor();
+ ash::Shell::GetInstance()->cursor_manager()->LockCursor();
+}
+
+void PaletteDelegateChromeOS::OnLaserPointerDisabled() {
+ ash::Shell::GetInstance()->cursor_manager()->UnlockCursor();
+ ash::Shell::GetInstance()->cursor_manager()->ShowCursor();
+}
} // namespace chromeos
« no previous file with comments | « chrome/browser/ui/ash/palette_delegate_chromeos.h ('k') | ui/gfx/vector_icons/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698