| 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/test/event_generator.h" | 5 #include "ui/aura/test/event_generator.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "ui/aura/client/screen_position_client.h" | 10 #include "ui/aura/client/screen_position_client.h" |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 return; | 579 return; |
| 580 } | 580 } |
| 581 if (pending_events_.empty()) { | 581 if (pending_events_.empty()) { |
| 582 base::MessageLoopProxy::current()->PostTask( | 582 base::MessageLoopProxy::current()->PostTask( |
| 583 FROM_HERE, | 583 FROM_HERE, |
| 584 base::Bind(&EventGenerator::DispatchNextPendingEvent, | 584 base::Bind(&EventGenerator::DispatchNextPendingEvent, |
| 585 base::Unretained(this))); | 585 base::Unretained(this))); |
| 586 } | 586 } |
| 587 pending_events_.push_back(pending_event); | 587 pending_events_.push_back(pending_event); |
| 588 } else { | 588 } else { |
| 589 WindowTreeHostDelegate* root_window_host_delegate = | 589 RootWindowHostDelegate* root_window_host_delegate = |
| 590 current_root_window_->AsWindowTreeHostDelegate(); | 590 current_root_window_->AsRootWindowHostDelegate(); |
| 591 if (event->IsKeyEvent()) { | 591 if (event->IsKeyEvent()) { |
| 592 root_window_host_delegate->OnHostKeyEvent( | 592 root_window_host_delegate->OnHostKeyEvent( |
| 593 static_cast<ui::KeyEvent*>(event)); | 593 static_cast<ui::KeyEvent*>(event)); |
| 594 } else if (event->IsMouseEvent()) { | 594 } else if (event->IsMouseEvent()) { |
| 595 root_window_host_delegate->OnHostMouseEvent( | 595 root_window_host_delegate->OnHostMouseEvent( |
| 596 static_cast<ui::MouseEvent*>(event)); | 596 static_cast<ui::MouseEvent*>(event)); |
| 597 } else if (event->IsTouchEvent()) { | 597 } else if (event->IsTouchEvent()) { |
| 598 root_window_host_delegate->OnHostTouchEvent( | 598 root_window_host_delegate->OnHostTouchEvent( |
| 599 static_cast<ui::TouchEvent*>(event)); | 599 static_cast<ui::TouchEvent*>(event)); |
| 600 } else if (event->IsScrollEvent()) { | 600 } else if (event->IsScrollEvent()) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 616 base::MessageLoopProxy::current()->PostTask( | 616 base::MessageLoopProxy::current()->PostTask( |
| 617 FROM_HERE, | 617 FROM_HERE, |
| 618 base::Bind(&EventGenerator::DispatchNextPendingEvent, | 618 base::Bind(&EventGenerator::DispatchNextPendingEvent, |
| 619 base::Unretained(this))); | 619 base::Unretained(this))); |
| 620 } | 620 } |
| 621 } | 621 } |
| 622 | 622 |
| 623 | 623 |
| 624 } // namespace test | 624 } // namespace test |
| 625 } // namespace aura | 625 } // namespace aura |
| OLD | NEW |