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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 class DefaultEventGeneratorDelegate : public EventGeneratorDelegate { | 35 class DefaultEventGeneratorDelegate : public EventGeneratorDelegate { |
36 public: | 36 public: |
37 explicit DefaultEventGeneratorDelegate(Window* root_window) | 37 explicit DefaultEventGeneratorDelegate(Window* root_window) |
38 : root_window_(root_window) {} | 38 : root_window_(root_window) {} |
39 virtual ~DefaultEventGeneratorDelegate() {} | 39 virtual ~DefaultEventGeneratorDelegate() {} |
40 | 40 |
41 // EventGeneratorDelegate overrides: | 41 // EventGeneratorDelegate overrides: |
42 virtual WindowEventDispatcher* GetDispatcherAt( | 42 virtual WindowEventDispatcher* GetDispatcherAt( |
43 const gfx::Point& point) const OVERRIDE { | 43 const gfx::Point& point) const OVERRIDE { |
44 return root_window_->GetDispatcher(); | 44 return root_window_->GetHost()->dispatcher(); |
45 } | 45 } |
46 | 46 |
47 virtual client::ScreenPositionClient* GetScreenPositionClient( | 47 virtual client::ScreenPositionClient* GetScreenPositionClient( |
48 const aura::Window* window) const OVERRIDE { | 48 const aura::Window* window) const OVERRIDE { |
49 return NULL; | 49 return NULL; |
50 } | 50 } |
51 | 51 |
52 private: | 52 private: |
53 Window* root_window_; | 53 Window* root_window_; |
54 | 54 |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 base::MessageLoopProxy::current()->PostTask( | 624 base::MessageLoopProxy::current()->PostTask( |
625 FROM_HERE, | 625 FROM_HERE, |
626 base::Bind(&EventGenerator::DispatchNextPendingEvent, | 626 base::Bind(&EventGenerator::DispatchNextPendingEvent, |
627 base::Unretained(this))); | 627 base::Unretained(this))); |
628 } | 628 } |
629 } | 629 } |
630 | 630 |
631 | 631 |
632 } // namespace test | 632 } // namespace test |
633 } // namespace aura | 633 } // namespace aura |
OLD | NEW |