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

Side by Side Diff: ui/aura/root_window.cc

Issue 49383004: Ensure on Windows AURA that the cursor stays within the bounds of the window during a LockMouse ope… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/views/widget/desktop_aura/desktop_root_window_host_win.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } 316 }
317 317
318 bool RootWindow::ConfineCursorToWindow() { 318 bool RootWindow::ConfineCursorToWindow() {
319 // We would like to be able to confine the cursor to that window. However, 319 // We would like to be able to confine the cursor to that window. However,
320 // currently, we do not have such functionality in X. So we just confine 320 // currently, we do not have such functionality in X. So we just confine
321 // to the root window. This is ok because this option is currently only 321 // to the root window. This is ok because this option is currently only
322 // being used in fullscreen mode, so root_window bounds = window bounds. 322 // being used in fullscreen mode, so root_window bounds = window bounds.
323 return host_->ConfineCursorToRootWindow(); 323 return host_->ConfineCursorToRootWindow();
324 } 324 }
325 325
326 void RootWindow::UnConfineCursor() {
327 host_->UnConfineCursor();
328 }
329
326 void RootWindow::ScheduleRedrawRect(const gfx::Rect& damage_rect) { 330 void RootWindow::ScheduleRedrawRect(const gfx::Rect& damage_rect) {
327 compositor_->ScheduleRedrawRect(damage_rect); 331 compositor_->ScheduleRedrawRect(damage_rect);
328 } 332 }
329 333
330 Window* RootWindow::GetGestureTarget(ui::GestureEvent* event) { 334 Window* RootWindow::GetGestureTarget(ui::GestureEvent* event) {
331 Window* target = client::GetCaptureWindow(this); 335 Window* target = client::GetCaptureWindow(this);
332 if (!target) { 336 if (!target) {
333 target = ConsumerToWindow( 337 target = ConsumerToWindow(
334 ui::GestureRecognizer::Get()->GetTargetForGestureEvent(event)); 338 ui::GestureRecognizer::Get()->GetTargetForGestureEvent(event));
335 } 339 }
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 } 1195 }
1192 1196
1193 gfx::Transform RootWindow::GetInverseRootTransform() const { 1197 gfx::Transform RootWindow::GetInverseRootTransform() const {
1194 float scale = ui::GetDeviceScaleFactor(layer()); 1198 float scale = ui::GetDeviceScaleFactor(layer());
1195 gfx::Transform transform; 1199 gfx::Transform transform;
1196 transform.Scale(1.0f / scale, 1.0f / scale); 1200 transform.Scale(1.0f / scale, 1.0f / scale);
1197 return transformer_->GetInverseTransform() * transform; 1201 return transformer_->GetInverseTransform() * transform;
1198 } 1202 }
1199 1203
1200 } // namespace aura 1204 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/views/widget/desktop_aura/desktop_root_window_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698