| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |