| 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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 // static | 640 // static |
| 641 void Window::ConvertRectToTarget(const Window* source, | 641 void Window::ConvertRectToTarget(const Window* source, |
| 642 const Window* target, | 642 const Window* target, |
| 643 gfx::Rect* rect) { | 643 gfx::Rect* rect) { |
| 644 DCHECK(rect); | 644 DCHECK(rect); |
| 645 gfx::Point origin = rect->origin(); | 645 gfx::Point origin = rect->origin(); |
| 646 ConvertPointToTarget(source, target, &origin); | 646 ConvertPointToTarget(source, target, &origin); |
| 647 rect->set_origin(origin); | 647 rect->set_origin(origin); |
| 648 } | 648 } |
| 649 | 649 |
| 650 ui::TextInputClient* Window::GetFocusedTextInputClient() { |
| 651 return delegate_ ? delegate_->GetFocusedTextInputClient() : nullptr; |
| 652 } |
| 653 |
| 650 void Window::MoveCursorTo(const gfx::Point& point_in_window) { | 654 void Window::MoveCursorTo(const gfx::Point& point_in_window) { |
| 651 Window* root_window = GetRootWindow(); | 655 Window* root_window = GetRootWindow(); |
| 652 DCHECK(root_window); | 656 DCHECK(root_window); |
| 653 gfx::Point point_in_root(point_in_window); | 657 gfx::Point point_in_root(point_in_window); |
| 654 ConvertPointToTarget(this, root_window, &point_in_root); | 658 ConvertPointToTarget(this, root_window, &point_in_root); |
| 655 root_window->GetHost()->MoveCursorTo(point_in_root); | 659 root_window->GetHost()->MoveCursorTo(point_in_root); |
| 656 } | 660 } |
| 657 | 661 |
| 658 gfx::NativeCursor Window::GetCursor(const gfx::Point& point) const { | 662 gfx::NativeCursor Window::GetCursor(const gfx::Point& point) const { |
| 659 return delegate_ ? delegate_->GetCursor(point) : gfx::kNullCursor; | 663 return delegate_ ? delegate_->GetCursor(point) : gfx::kNullCursor; |
| (...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1460 return window; | 1464 return window; |
| 1461 if (offset) | 1465 if (offset) |
| 1462 *offset += window->bounds().OffsetFromOrigin(); | 1466 *offset += window->bounds().OffsetFromOrigin(); |
| 1463 } | 1467 } |
| 1464 if (offset) | 1468 if (offset) |
| 1465 *offset = gfx::Vector2d(); | 1469 *offset = gfx::Vector2d(); |
| 1466 return NULL; | 1470 return NULL; |
| 1467 } | 1471 } |
| 1468 | 1472 |
| 1469 } // namespace aura | 1473 } // namespace aura |
| OLD | NEW |