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