| 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/window.h" | 5 #include "ui/aura/window.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 // static | 602 // static |
| 603 void Window::ConvertRectToTarget(const Window* source, | 603 void Window::ConvertRectToTarget(const Window* source, |
| 604 const Window* target, | 604 const Window* target, |
| 605 gfx::Rect* rect) { | 605 gfx::Rect* rect) { |
| 606 DCHECK(rect); | 606 DCHECK(rect); |
| 607 gfx::Point origin = rect->origin(); | 607 gfx::Point origin = rect->origin(); |
| 608 ConvertPointToTarget(source, target, &origin); | 608 ConvertPointToTarget(source, target, &origin); |
| 609 rect->set_origin(origin); | 609 rect->set_origin(origin); |
| 610 } | 610 } |
| 611 | 611 |
| 612 ui::TextInputClient* Window::GetFocusedTextInputClient() { | |
| 613 return delegate_ ? delegate_->GetFocusedTextInputClient() : nullptr; | |
| 614 } | |
| 615 | |
| 616 void Window::MoveCursorTo(const gfx::Point& point_in_window) { | 612 void Window::MoveCursorTo(const gfx::Point& point_in_window) { |
| 617 Window* root_window = GetRootWindow(); | 613 Window* root_window = GetRootWindow(); |
| 618 DCHECK(root_window); | 614 DCHECK(root_window); |
| 619 gfx::Point point_in_root(point_in_window); | 615 gfx::Point point_in_root(point_in_window); |
| 620 ConvertPointToTarget(this, root_window, &point_in_root); | 616 ConvertPointToTarget(this, root_window, &point_in_root); |
| 621 root_window->GetHost()->MoveCursorTo(point_in_root); | 617 root_window->GetHost()->MoveCursorTo(point_in_root); |
| 622 } | 618 } |
| 623 | 619 |
| 624 gfx::NativeCursor Window::GetCursor(const gfx::Point& point) const { | 620 gfx::NativeCursor Window::GetCursor(const gfx::Point& point) const { |
| 625 return delegate_ ? delegate_->GetCursor(point) : gfx::kNullCursor; | 621 return delegate_ ? delegate_->GetCursor(point) : gfx::kNullCursor; |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 return window; | 1397 return window; |
| 1402 if (offset) | 1398 if (offset) |
| 1403 *offset += window->bounds().OffsetFromOrigin(); | 1399 *offset += window->bounds().OffsetFromOrigin(); |
| 1404 } | 1400 } |
| 1405 if (offset) | 1401 if (offset) |
| 1406 *offset = gfx::Vector2d(); | 1402 *offset = gfx::Vector2d(); |
| 1407 return NULL; | 1403 return NULL; |
| 1408 } | 1404 } |
| 1409 | 1405 |
| 1410 } // namespace aura | 1406 } // namespace aura |
| OLD | NEW |