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

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: Rebased. 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/accelerators/accelerator_controller_delegate_aura.h" 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h"
8 #include "ash/common/system/chromeos/palette/palette_utils.h" 8 #include "ash/common/system/chromeos/palette/palette_utils.h"
9 #include "ash/magnifier/partial_magnification_controller.h" 9 #include "ash/magnifier/partial_magnification_controller.h"
10 #include "ash/screenshot_delegate.h" 10 #include "ash/screenshot_delegate.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 screenshot_controller->set_pen_events_only(true); 166 screenshot_controller->set_pen_events_only(true);
167 screenshot_controller->StartPartialScreenshotSession( 167 screenshot_controller->StartPartialScreenshotSession(
168 screenshot_delegate, false /* draw_overlay_immediately */); 168 screenshot_delegate, false /* draw_overlay_immediately */);
169 } 169 }
170 170
171 void PaletteDelegateChromeOS::OnStylusStateChanged(ui::StylusState state) { 171 void PaletteDelegateChromeOS::OnStylusStateChanged(ui::StylusState state) {
172 on_stylus_state_changed_.Run(state); 172 on_stylus_state_changed_.Run(state);
173 } 173 }
174 174
175 void PaletteDelegateChromeOS::OnLaserPointerEnabled() {
176 // We lock the cursor after we hide it because compound_event_filter.cc will
177 // attempt to call ShowCursor every time it recieves a mouse event.
178 ash::Shell::GetInstance()->cursor_manager()->HideCursor();
179 ash::Shell::GetInstance()->cursor_manager()->LockCursor();
180 }
181
182 void PaletteDelegateChromeOS::OnLaserPointerDisabled() {
183 ash::Shell::GetInstance()->cursor_manager()->UnlockCursor();
184 ash::Shell::GetInstance()->cursor_manager()->ShowCursor();
185 }
175 } // namespace chromeos 186 } // namespace chromeos
OLDNEW
« 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