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

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

Issue 2231533004: Pointer watcher modifications to support laser pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Initial patch. 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
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 0342a30c08b6f48a81a9f6cb3efed1d5a9b91b31..01e5f49ad8ad8cc3db34d6a652b6deb71991e33b 100644
--- a/chrome/browser/ui/ash/palette_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/palette_delegate_chromeos.cc
@@ -4,10 +4,25 @@
#include "chrome/browser/ui/ash/palette_delegate_chromeos.h"
+#include "ash/shell.h"
+
namespace chromeos {
-PaletteDelegateChromeOS::PaletteDelegateChromeOS() {}
+PaletteDelegateChromeOS::PaletteDelegateChromeOS() {
jdufault 2016/08/11 23:41:54 Revert
+ LOG(ERROR) << "dude";
+}
PaletteDelegateChromeOS::~PaletteDelegateChromeOS() {}
+void PaletteDelegateChromeOS::OnLaserModeEnabled() {
+ // We lock the cursor after we hide it because it is always being updated by
+ // compound_event_filter.cc to be shown on every mouse movement.
+ ash::Shell::GetInstance()->cursor_manager()->HideCursor();
+ ash::Shell::GetInstance()->cursor_manager()->LockCursor();
+}
+
+void PaletteDelegateChromeOS::OnLaserModeDisabled() {
+ ash::Shell::GetInstance()->cursor_manager()->UnlockCursor();
+ ash::Shell::GetInstance()->cursor_manager()->ShowCursor();
+}
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698