| 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 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 | 1408 |
| 1409 ui::EventTarget* Window::GetParentTarget() { | 1409 ui::EventTarget* Window::GetParentTarget() { |
| 1410 if (IsRootWindow()) { | 1410 if (IsRootWindow()) { |
| 1411 return client::GetEventClient(this) ? | 1411 return client::GetEventClient(this) ? |
| 1412 client::GetEventClient(this)->GetToplevelEventTarget() : | 1412 client::GetEventClient(this)->GetToplevelEventTarget() : |
| 1413 Env::GetInstance(); | 1413 Env::GetInstance(); |
| 1414 } | 1414 } |
| 1415 return parent_; | 1415 return parent_; |
| 1416 } | 1416 } |
| 1417 | 1417 |
| 1418 scoped_ptr<ui::EventTargetIterator> Window::GetChildIterator() const { | 1418 scoped_ptr<ui::EventTargetIterator> Window::GetChildIterator() { |
| 1419 return scoped_ptr<ui::EventTargetIterator>( | 1419 return scoped_ptr<ui::EventTargetIterator>( |
| 1420 new ui::EventTargetIteratorImpl<Window>(children())); | 1420 new ui::EventTargetIteratorImpl<Window>(children())); |
| 1421 } | 1421 } |
| 1422 | 1422 |
| 1423 ui::EventTargeter* Window::GetEventTargeter() { | 1423 ui::EventTargeter* Window::GetEventTargeter() { |
| 1424 return targeter_.get(); | 1424 return targeter_.get(); |
| 1425 } | 1425 } |
| 1426 | 1426 |
| 1427 void Window::ConvertEventToTarget(ui::EventTarget* target, | 1427 void Window::ConvertEventToTarget(ui::EventTarget* target, |
| 1428 ui::LocatedEvent* event) { | 1428 ui::LocatedEvent* event) { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 return window; | 1461 return window; |
| 1462 if (offset) | 1462 if (offset) |
| 1463 *offset += window->bounds().OffsetFromOrigin(); | 1463 *offset += window->bounds().OffsetFromOrigin(); |
| 1464 } | 1464 } |
| 1465 if (offset) | 1465 if (offset) |
| 1466 *offset = gfx::Vector2d(); | 1466 *offset = gfx::Vector2d(); |
| 1467 return NULL; | 1467 return NULL; |
| 1468 } | 1468 } |
| 1469 | 1469 |
| 1470 } // namespace aura | 1470 } // namespace aura |
| OLD | NEW |