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

Side by Side 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: Fixed patch set 6 errors. 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() {}
10 12
11 PaletteDelegateChromeOS::~PaletteDelegateChromeOS() {} 13 PaletteDelegateChromeOS::~PaletteDelegateChromeOS() {}
12 14
15 void PaletteDelegateChromeOS::OnLaserPointerEnabled() {
16 // We lock the cursor after we hide it because compound_event_filter.cc will
17 // attempt to call ShowCursor every time it recieves a mouse event.
18 ash::Shell::GetInstance()->cursor_manager()->HideCursor();
19 ash::Shell::GetInstance()->cursor_manager()->LockCursor();
20 }
21
22 void PaletteDelegateChromeOS::OnLaserPointerDisabled() {
23 ash::Shell::GetInstance()->cursor_manager()->UnlockCursor();
24 ash::Shell::GetInstance()->cursor_manager()->ShowCursor();
25 }
13 } // namespace chromeos 26 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698