Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: ui/aura/window.cc

Issue 724973003: Get event targetting working for mouse events. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: More comments, de-const a bunch of stuff in ui/. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/aura/window.h ('k') | ui/events/event_dispatcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/aura/window.h ('k') | ui/events/event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698