| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 gfx::Point origin = rect->origin(); | 457 gfx::Point origin = rect->origin(); |
| 458 ConvertPointToTarget(source, target, &origin); | 458 ConvertPointToTarget(source, target, &origin); |
| 459 rect->set_origin(origin); | 459 rect->set_origin(origin); |
| 460 } | 460 } |
| 461 | 461 |
| 462 void Window::MoveCursorTo(const gfx::Point& point_in_window) { | 462 void Window::MoveCursorTo(const gfx::Point& point_in_window) { |
| 463 Window* root_window = GetRootWindow(); | 463 Window* root_window = GetRootWindow(); |
| 464 DCHECK(root_window); | 464 DCHECK(root_window); |
| 465 gfx::Point point_in_root(point_in_window); | 465 gfx::Point point_in_root(point_in_window); |
| 466 ConvertPointToTarget(this, root_window, &point_in_root); | 466 ConvertPointToTarget(this, root_window, &point_in_root); |
| 467 root_window->GetHost()->MoveCursorTo(point_in_root); | 467 root_window->GetHost()->MoveCursorToLocationInDIP(point_in_root); |
| 468 } | 468 } |
| 469 | 469 |
| 470 gfx::NativeCursor Window::GetCursor(const gfx::Point& point) const { | 470 gfx::NativeCursor Window::GetCursor(const gfx::Point& point) const { |
| 471 return delegate_ ? delegate_->GetCursor(point) : gfx::kNullCursor; | 471 return delegate_ ? delegate_->GetCursor(point) : gfx::kNullCursor; |
| 472 } | 472 } |
| 473 | 473 |
| 474 void Window::AddObserver(WindowObserver* observer) { | 474 void Window::AddObserver(WindowObserver* observer) { |
| 475 observer->OnObservingWindow(this); | 475 observer->OnObservingWindow(this); |
| 476 observers_.AddObserver(observer); | 476 observers_.AddObserver(observer); |
| 477 } | 477 } |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 layer_name = "Unnamed Window"; | 1116 layer_name = "Unnamed Window"; |
| 1117 | 1117 |
| 1118 if (id_ != -1) | 1118 if (id_ != -1) |
| 1119 layer_name += " " + base::IntToString(id_); | 1119 layer_name += " " + base::IntToString(id_); |
| 1120 | 1120 |
| 1121 layer()->set_name(layer_name); | 1121 layer()->set_name(layer_name); |
| 1122 #endif | 1122 #endif |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 } // namespace aura | 1125 } // namespace aura |
| OLD | NEW |