| Index: ash/wm/window_manager_unittest.cc
|
| diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc
|
| index af15f3ef93705db34bac443d550eb2531107153c..bccd62a06e240e247db8c83d302c3a782cd6510b 100644
|
| --- a/ash/wm/window_manager_unittest.cc
|
| +++ b/ash/wm/window_manager_unittest.cc
|
| @@ -18,10 +18,10 @@
|
| #include "ui/aura/test/test_event_handler.h"
|
| #include "ui/aura/test/test_window_delegate.h"
|
| #include "ui/aura/test/test_windows.h"
|
| -#include "ui/aura/window_event_dispatcher.h"
|
| #include "ui/base/cursor/cursor.h"
|
| #include "ui/base/hit_test.h"
|
| #include "ui/events/event.h"
|
| +#include "ui/events/event_processor.h"
|
| #include "ui/events/event_utils.h"
|
| #include "ui/gfx/screen.h"
|
| #include "ui/views/corewm/compound_event_filter.h"
|
| @@ -183,8 +183,7 @@ TEST_F(WindowManagerTest, Focus) {
|
| aura::client::GetFocusClient(w121.get());
|
| EXPECT_EQ(w121.get(), focus_client->GetFocusedWindow());
|
|
|
| - aura::WindowEventDispatcher* dispatcher =
|
| - root_window->GetHost()->dispatcher();
|
| + ui::EventProcessor* dispatcher = root_window->GetHost()->event_processor();
|
|
|
| // The key press should be sent to the focused sub-window.
|
| ui::KeyEvent keyev(ui::ET_KEY_PRESSED, ui::VKEY_E, 0, false);
|
| @@ -447,8 +446,7 @@ TEST_F(WindowManagerTest, ActivateOnTouch) {
|
| aura::Window::ConvertPointToTarget(w2->parent(), root_window, &press_point);
|
| ui::TouchEvent touchev1(ui::ET_TOUCH_PRESSED, press_point, 0, getTime());
|
|
|
| - aura::WindowEventDispatcher* dispatcher =
|
| - root_window->GetHost()->dispatcher();
|
| + ui::EventProcessor* dispatcher = root_window->GetHost()->event_processor();
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&touchev1);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
|
|
| @@ -510,12 +508,11 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
| gfx::Point point2(kWindowLeft + 1, kWindowTop + 1);
|
| aura::Window::ConvertPointToTarget(window->parent(), root_window, &point2);
|
|
|
| - aura::WindowEventDispatcher* dispatcher =
|
| - root_window->GetHost()->dispatcher();
|
| + aura::WindowTreeHost* host = root_window->GetHost();
|
| + ui::EventProcessor* dispatcher = host->event_processor();
|
|
|
| // Cursor starts as a pointer (set during Shell::Init()).
|
| - EXPECT_EQ(ui::kCursorPointer,
|
| - dispatcher->host()->last_cursor().native_type());
|
| + EXPECT_EQ(ui::kCursorPointer, host->last_cursor().native_type());
|
|
|
| {
|
| // Resize edges and corners show proper cursors.
|
| @@ -523,8 +520,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
| ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0);
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| - EXPECT_EQ(ui::kCursorSouthResize,
|
| - dispatcher->host()->last_cursor().native_type());
|
| + EXPECT_EQ(ui::kCursorSouthResize, host->last_cursor().native_type());
|
| }
|
|
|
| {
|
| @@ -532,8 +528,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
| ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0, 0);
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| - EXPECT_EQ(ui::kCursorSouthWestResize,
|
| - dispatcher->host()->last_cursor().native_type());
|
| + EXPECT_EQ(ui::kCursorSouthWestResize, host->last_cursor().native_type());
|
| }
|
|
|
| {
|
| @@ -541,8 +536,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
| ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0);
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| - EXPECT_EQ(ui::kCursorSouthEastResize,
|
| - dispatcher->host()->last_cursor().native_type());
|
| + EXPECT_EQ(ui::kCursorSouthEastResize, host->last_cursor().native_type());
|
| }
|
|
|
| {
|
| @@ -550,8 +544,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
| ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0, 0);
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| - EXPECT_EQ(ui::kCursorWestResize,
|
| - dispatcher->host()->last_cursor().native_type());
|
| + EXPECT_EQ(ui::kCursorWestResize, host->last_cursor().native_type());
|
| }
|
|
|
| {
|
| @@ -559,8 +552,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
| ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0);
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| - EXPECT_EQ(ui::kCursorEastResize,
|
| - dispatcher->host()->last_cursor().native_type());
|
| + EXPECT_EQ(ui::kCursorEastResize, host->last_cursor().native_type());
|
| }
|
|
|
| {
|
| @@ -568,8 +560,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
| ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0, 0);
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| - EXPECT_EQ(ui::kCursorNorthResize,
|
| - dispatcher->host()->last_cursor().native_type());
|
| + EXPECT_EQ(ui::kCursorNorthResize, host->last_cursor().native_type());
|
| }
|
|
|
| {
|
| @@ -577,8 +568,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
| ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0);
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| - EXPECT_EQ(ui::kCursorNorthWestResize,
|
| - dispatcher->host()->last_cursor().native_type());
|
| + EXPECT_EQ(ui::kCursorNorthWestResize, host->last_cursor().native_type());
|
| }
|
|
|
| {
|
| @@ -586,8 +576,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
| ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0, 0);
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move2);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| - EXPECT_EQ(ui::kCursorNorthEastResize,
|
| - dispatcher->host()->last_cursor().native_type());
|
| + EXPECT_EQ(ui::kCursorNorthEastResize, host->last_cursor().native_type());
|
| }
|
|
|
| {
|
| @@ -596,7 +585,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
| ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0, 0);
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&move1);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| - EXPECT_EQ(ui::kCursorNull, dispatcher->host()->last_cursor().native_type());
|
| + EXPECT_EQ(ui::kCursorNull, host->last_cursor().native_type());
|
| }
|
| }
|
|
|
| @@ -632,8 +621,7 @@ TEST_F(WindowManagerTest, MAYBE_TransformActivate) {
|
| miss_point,
|
| ui::EF_LEFT_MOUSE_BUTTON,
|
| ui::EF_LEFT_MOUSE_BUTTON);
|
| - aura::WindowEventDispatcher* dispatcher =
|
| - root_window->GetHost()->dispatcher();
|
| + ui::EventProcessor* dispatcher = root_window->GetHost()->event_processor();
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&mouseev1);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(NULL, aura::client::GetFocusClient(w1.get())->GetFocusedWindow());
|
| @@ -685,8 +673,7 @@ TEST_F(WindowManagerTest, AdditionalFilters) {
|
|
|
| // Dispatches mouse and keyboard events.
|
| ui::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_A, 0, false);
|
| - aura::WindowEventDispatcher* dispatcher =
|
| - root_window->GetHost()->dispatcher();
|
| + ui::EventProcessor* dispatcher = root_window->GetHost()->event_processor();
|
| ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&key_event);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| ui::MouseEvent mouse_pressed(
|
|
|