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

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

Issue 2311393004: Laser tool blocks events from propagating. (Closed)
Patch Set: Fixed patch set 1 errors. 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 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 bcc0fddc2223ce400eae27cd22543c7140bd79a9..7c6daff30bf2cf0f3674fa7fba642de9e103e672 100644
--- a/chrome/browser/ui/ash/palette_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/palette_delegate_chromeos.cc
@@ -6,6 +6,7 @@
#include "ash/accelerators/accelerator_controller_delegate_aura.h"
#include "ash/common/system/chromeos/palette/palette_utils.h"
+#include "ash/laser/laser_pointer_controller.h"
#include "ash/magnifier/partial_magnification_controller.h"
#include "ash/screenshot_delegate.h"
#include "ash/shell.h"
@@ -223,15 +224,9 @@ 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();
+void PaletteDelegateChromeOS::SetLaserPointerState(bool enabled) {
+ ash::LaserPointerController* controller =
+ ash::Shell::GetInstance()->laser_pointer_controller();
+ controller->SetEnabled(enabled);
}
} // namespace chromeos
« ash/laser/laser_pointer_view.cc ('K') | « 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