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

Side by Side 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 unified diff | Download patch
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/shell.h"
8
7 namespace chromeos { 9 namespace chromeos {
8 10
9 PaletteDelegateChromeOS::PaletteDelegateChromeOS() {} 11 PaletteDelegateChromeOS::PaletteDelegateChromeOS() {
jdufault 2016/08/11 23:41:54 Revert
12 LOG(ERROR) << "dude";
13 }
10 14
11 PaletteDelegateChromeOS::~PaletteDelegateChromeOS() {} 15 PaletteDelegateChromeOS::~PaletteDelegateChromeOS() {}
12 16
17 void PaletteDelegateChromeOS::OnLaserModeEnabled() {
18 // We lock the cursor after we hide it because it is always being updated by
19 // compound_event_filter.cc to be shown on every mouse movement.
20 ash::Shell::GetInstance()->cursor_manager()->HideCursor();
21 ash::Shell::GetInstance()->cursor_manager()->LockCursor();
22 }
23
24 void PaletteDelegateChromeOS::OnLaserModeDisabled() {
25 ash::Shell::GetInstance()->cursor_manager()->UnlockCursor();
26 ash::Shell::GetInstance()->cursor_manager()->ShowCursor();
27 }
13 } // namespace chromeos 28 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698