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

Unified Diff: trunk/src/ui/aura/gestures/gesture_recognizer_unittest.cc

Issue 77203002: Revert 236048 "Rename RootWindowHost* to WindowTreeHost*" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/ui/aura/env.h ('k') | trunk/src/ui/aura/remote_root_window_host_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ui/aura/gestures/gesture_recognizer_unittest.cc
===================================================================
--- trunk/src/ui/aura/gestures/gesture_recognizer_unittest.cc (revision 236091)
+++ trunk/src/ui/aura/gestures/gesture_recognizer_unittest.cc (working copy)
@@ -574,7 +574,7 @@
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(x, y),
touch_id,
base::TimeDelta::FromMilliseconds(simulated_now_));
- root_window->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
simulated_now_ += time_step;
}
}
@@ -588,7 +588,7 @@
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(x, y),
touch_id,
base::TimeDelta::FromMilliseconds(simulated_now_));
- root_window->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ root_window->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
simulated_now_++;
}
};
@@ -699,7 +699,7 @@
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->show_press());
EXPECT_TRUE(delegate->tap_down());
@@ -721,7 +721,7 @@
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -754,7 +754,7 @@
kTouchId, tes.Now());
press.set_radius_x(5);
press.set_radius_y(12);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -772,7 +772,7 @@
release.set_radius_x(5);
release.set_radius_y(12);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -797,7 +797,7 @@
kTouchId, tes.Now());
press.set_radius_x(8);
press.set_radius_y(14);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -813,7 +813,7 @@
release.set_radius_x(20);
release.set_radius_y(13);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -838,7 +838,7 @@
kTouchId, tes.Now());
press.set_radius_x(6);
press.set_radius_y(10);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -854,7 +854,7 @@
kTouchId, tes.LeapForward(50));
move.set_radius_x(8);
move.set_radius_y(12);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -870,7 +870,7 @@
release.set_radius_x(4);
release.set_radius_y(8);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -895,7 +895,7 @@
kTouchId, tes.Now());
press.set_radius_x(7);
press.set_radius_y(10);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -910,7 +910,7 @@
kTouchId, tes.LeapForward(50));
move.set_radius_x(13);
move.set_radius_y(12);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -925,7 +925,7 @@
kTouchId, tes.LeapForward(50));
move1.set_radius_x(16);
move1.set_radius_y(16);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -940,7 +940,7 @@
kTouchId, tes.LeapForward(50));
move2.set_radius_x(14);
move2.set_radius_y(10);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -956,7 +956,7 @@
release.set_radius_x(8);
release.set_radius_y(9);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -990,7 +990,7 @@
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_TAP_DOWN);
@@ -1031,7 +1031,7 @@
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId,
tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_SCROLL_FLING_START,
ui::ET_GESTURE_END);
@@ -1058,7 +1058,7 @@
gfx::Vector2dF total_scroll;
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_TAP_DOWN);
@@ -1108,7 +1108,7 @@
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId,
tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
}
// Check that the bounding box during a scroll event is correct.
@@ -1132,7 +1132,7 @@
gfx::Point(kPositionX, kPositionY),
kTouchId,
tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_EQ(gfx::Rect(kPositionX - radius,
kPositionY - radius,
radius * 2,
@@ -1157,7 +1157,7 @@
kPositionY + kScrollAmount),
kTouchId, press.time_stamp() +
base::TimeDelta::FromMilliseconds(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_EQ(gfx::Rect(kPositionX + kScrollAmount - radius,
kPositionY + kScrollAmount - radius,
radius * 2,
@@ -1180,7 +1180,7 @@
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point horizontally enough that it is considered a
// horizontal scroll.
@@ -1203,7 +1203,7 @@
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->fling());
EXPECT_FALSE(delegate->scroll_end());
@@ -1224,7 +1224,7 @@
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point vertically enough that it is considered a
// vertical scroll.
@@ -1247,7 +1247,7 @@
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->fling());
EXPECT_FALSE(delegate->scroll_end());
@@ -1268,7 +1268,7 @@
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point such that a non-rail scroll begins
tes.SendScrollEvent(dispatcher(), 20, 20, kTouchId, delegate.get());
@@ -1283,7 +1283,7 @@
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->fling());
EXPECT_FALSE(delegate->scroll_end());
@@ -1312,7 +1312,7 @@
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->begin());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1329,7 +1329,7 @@
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
// Note the tap down isn't cancelled until the release
@@ -1361,7 +1361,7 @@
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
// We haven't pressed long enough for a long press to occur
@@ -1378,7 +1378,7 @@
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(10));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
EXPECT_FALSE(delegate->tap_cancel());
}
@@ -1404,7 +1404,7 @@
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->begin());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1421,7 +1421,7 @@
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
EXPECT_TRUE(delegate->long_tap());
@@ -1454,7 +1454,7 @@
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->begin());
@@ -1465,7 +1465,7 @@
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->tap_down()); // no touch down for second tap.
EXPECT_TRUE(delegate->tap_cancel());
EXPECT_TRUE(delegate->begin());
@@ -1479,7 +1479,7 @@
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
EXPECT_TRUE(delegate->two_finger_tap());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1498,7 +1498,7 @@
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point horizontally enough that it is considered a
// horizontal scroll.
@@ -1545,7 +1545,7 @@
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 0),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// Move the touch-point vertically enough that it is considered a
// vertical scroll.
@@ -1593,7 +1593,7 @@
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1606,7 +1606,7 @@
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1619,7 +1619,7 @@
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(1000));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1634,7 +1634,7 @@
delegate->Reset();
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(130, 230),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_TRUE(delegate->tap_cancel());
@@ -1648,7 +1648,7 @@
delegate->Reset();
ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(110, 211),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1661,7 +1661,7 @@
delegate->Reset();
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(140, 215),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1675,7 +1675,7 @@
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1702,7 +1702,7 @@
queued_delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(queued_delegate->tap());
EXPECT_FALSE(queued_delegate->tap_down());
EXPECT_FALSE(queued_delegate->tap_cancel());
@@ -1717,7 +1717,7 @@
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, press.time_stamp() +
base::TimeDelta::FromMilliseconds(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(queued_delegate->tap());
EXPECT_FALSE(queued_delegate->tap_down());
EXPECT_FALSE(queued_delegate->tap_cancel());
@@ -1736,7 +1736,7 @@
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 20),
kTouchId2, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1748,7 +1748,7 @@
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(10, 20),
kTouchId2, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
// Process the first queued event.
queued_delegate->Reset();
@@ -1779,7 +1779,7 @@
queued_delegate->Reset();
ui::TouchEvent press3(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press3);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press3);
EXPECT_FALSE(queued_delegate->tap());
EXPECT_FALSE(queued_delegate->tap_down());
EXPECT_FALSE(queued_delegate->tap_cancel());
@@ -1795,7 +1795,7 @@
delegate->Reset();
ui::TouchEvent press4(ui::ET_TOUCH_PRESSED, gfx::Point(103, 203),
kTouchId2, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press4);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press4);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1820,7 +1820,7 @@
int x_move = ui::GestureConfiguration::max_touch_move_in_pixels_for_click();
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(103 + x_move, 203),
kTouchId2, GetTime());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -1894,7 +1894,7 @@
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_TAP_DOWN);
@@ -1904,7 +1904,7 @@
delegate->Reset();
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(130, 301),
kTouchId1, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
EXPECT_3_EVENTS(delegate->events(),
ui::ET_GESTURE_TAP_CANCEL,
ui::ET_GESTURE_SCROLL_BEGIN,
@@ -1915,7 +1915,7 @@
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId2, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_PINCH_BEGIN);
@@ -1926,7 +1926,7 @@
delegate->Reset();
ui::TouchEvent move3(ui::ET_TOUCH_MOVED, gfx::Point(95, 201),
kTouchId1, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move3);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move3);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_UPDATE,
ui::ET_GESTURE_SCROLL_UPDATE);
@@ -1937,7 +1937,7 @@
delegate->Reset();
ui::TouchEvent move4(ui::ET_TOUCH_MOVED, gfx::Point(55, 15),
kTouchId2, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move4);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move4);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_UPDATE,
ui::ET_GESTURE_SCROLL_UPDATE);
@@ -1948,7 +1948,7 @@
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_END,
ui::ET_GESTURE_END);
@@ -1959,7 +1959,7 @@
delegate->Reset();
ui::TouchEvent move5(ui::ET_TOUCH_MOVED, gfx::Point(25, 10),
kTouchId2, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move5);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move5);
EXPECT_1_EVENT(delegate->events(), ui::ET_GESTURE_SCROLL_UPDATE);
EXPECT_TRUE(delegate->bounding_box().IsEmpty());
}
@@ -1978,11 +1978,11 @@
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 301),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->pinch_begin());
// Touch move triggers pinch begin.
@@ -1999,7 +1999,7 @@
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_TRUE(delegate->pinch_end());
tes.SendScrollEvent(dispatcher(), 130, 230, kTouchId2, delegate.get());
@@ -2009,12 +2009,12 @@
delegate->Reset();
ui::TouchEvent press3(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press3);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press3);
// Now the touch points are close. So we will go into two finger tap.
// Move the touch-point enough to break two-finger-tap and enter pinch.
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(101, 202),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_TRUE(delegate->pinch_begin());
tes.SendScrollEvent(dispatcher(), 130, 230, kTouchId1, delegate.get());
@@ -2038,7 +2038,7 @@
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 301),
kTouchId1, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_BEGIN,
ui::ET_GESTURE_TAP_DOWN);
@@ -2048,7 +2048,7 @@
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId2, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_TAP_CANCEL,
ui::ET_GESTURE_BEGIN);
@@ -2059,7 +2059,7 @@
delegate->Reset();
ui::TouchEvent move3(ui::ET_TOUCH_MOVED, gfx::Point(65, 201),
kTouchId1, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move3);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move3);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_BEGIN,
ui::ET_GESTURE_SCROLL_BEGIN);
@@ -2070,7 +2070,7 @@
delegate->Reset();
ui::TouchEvent move4(ui::ET_TOUCH_MOVED, gfx::Point(55, 15),
kTouchId2, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move4);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move4);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_UPDATE,
ui::ET_GESTURE_SCROLL_UPDATE);
@@ -2081,7 +2081,7 @@
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.LeapForward(10));
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_2_EVENTS(delegate->events(),
ui::ET_GESTURE_PINCH_END,
ui::ET_GESTURE_END);
@@ -2092,7 +2092,7 @@
delegate->Reset();
ui::TouchEvent move5(ui::ET_TOUCH_MOVED, gfx::Point(25, 10),
kTouchId2, tes.Now());
- root->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move5);
+ root->AsRootWindowHostDelegate()->OnHostTouchEvent(&move5);
EXPECT_1_EVENT(delegate->events(), ui::ET_GESTURE_SCROLL_UPDATE);
EXPECT_TRUE(delegate->bounding_box().IsEmpty());
}
@@ -2104,7 +2104,7 @@
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
6, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
}
@@ -2142,7 +2142,7 @@
windows[i]->set_id(i);
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, window_bounds[i].origin(),
i, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
}
// Touches should now be associated with the closest touch within
@@ -2159,10 +2159,10 @@
// Add a touch in the middle associated with windows[2]
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(0, 500),
kNumWindows, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
ui::TouchEvent move(ui::ET_TOUCH_MOVED, gfx::Point(250, 250),
kNumWindows, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
target = gesture_recognizer->GetTargetForLocation(gfx::Point(250, 250));
EXPECT_EQ("2", WindowIDAsString(target));
@@ -2183,7 +2183,7 @@
// Move a touch associated with windows[2] to 1000, 1000
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(1000, 1000),
kNumWindows, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
target = gesture_recognizer->GetTargetForLocation(gfx::Point(1000, 1000));
EXPECT_EQ("2", WindowIDAsString(target));
@@ -2214,11 +2214,11 @@
gfx::Point pos1(-10, -10);
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, pos1, 0, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
gfx::Point pos2(1000, 1000);
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, pos2, 1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
// As these presses were outside the root window, they should be
// associated with the root window.
@@ -2239,10 +2239,10 @@
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
delegate->Reset();
delegate->ReceivedAck();
@@ -2272,9 +2272,9 @@
tes.LeapForward(200));
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(15, 25), kTouchId1,
tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
delegate->Reset();
// Ack the press event.
@@ -2308,12 +2308,12 @@
tes.LeapForward(14));
// Do a pinch.
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
// Ack the press and move events.
delegate->Reset();
@@ -2442,14 +2442,14 @@
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(45, 45), 7, tes.Now());
press.set_radius_x(40);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_TRUE(delegate->tap_down());
EXPECT_EQ(gfx::Rect(5, 5, 80, 80).ToString(),
delegate->bounding_box().ToString());
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(55, 45), 7, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
// This new press should not generate a tap-down.
EXPECT_FALSE(delegate->begin());
@@ -2473,7 +2473,7 @@
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2486,7 +2486,7 @@
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down()); // no touch down for second tap.
EXPECT_TRUE(delegate->tap_cancel());
@@ -2500,10 +2500,10 @@
delegate->Reset();
ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(102, 202),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(131, 202),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2519,7 +2519,7 @@
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2535,7 +2535,7 @@
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2561,19 +2561,19 @@
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
// Send release event after sufficient delay so that two finger time expires.
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.LeapForward(1000));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->two_finger_tap());
// Lift second finger.
@@ -2583,7 +2583,7 @@
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_FALSE(delegate->two_finger_tap());
}
@@ -2605,12 +2605,12 @@
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
tes.SendScrollEvent(dispatcher(), 130, 230, kTouchId1, delegate.get());
EXPECT_FALSE(delegate->two_finger_tap());
@@ -2622,7 +2622,7 @@
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
EXPECT_TRUE(delegate->pinch_end());
}
@@ -2636,12 +2636,12 @@
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
tes.SendScrollEvent(dispatcher(), 101, 230, kTouchId2, delegate.get());
EXPECT_FALSE(delegate->two_finger_tap());
@@ -2653,7 +2653,7 @@
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
EXPECT_TRUE(delegate->pinch_end());
}
@@ -2675,13 +2675,13 @@
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
tes.SendScrollEvent(dispatcher(), 130, 230, kTouchId1, delegate.get());
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_TRUE(delegate->pinch_begin());
@@ -2691,7 +2691,7 @@
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
EXPECT_TRUE(delegate->pinch_end());
}
@@ -2754,17 +2754,17 @@
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
delegate->Reset();
ui::TouchEvent cancel(ui::ET_TOUCH_CANCELLED, gfx::Point(130, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&cancel);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&cancel);
EXPECT_FALSE(delegate->two_finger_tap());
// Make sure there is enough delay before the touch is released so that it
@@ -2773,7 +2773,7 @@
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
}
@@ -2786,17 +2786,17 @@
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
delegate->Reset();
ui::TouchEvent cancel(ui::ET_TOUCH_CANCELLED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&cancel);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&cancel);
EXPECT_FALSE(delegate->two_finger_tap());
// Make sure there is enough delay before the touch is released so that it
@@ -2805,7 +2805,7 @@
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId1, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->two_finger_tap());
}
}
@@ -2825,7 +2825,7 @@
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2838,7 +2838,7 @@
delegate->Reset();
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(430, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down()); // no touch down for second tap.
EXPECT_TRUE(delegate->tap_cancel());
@@ -2852,7 +2852,7 @@
delegate->Reset();
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(530, 301),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2879,10 +2879,10 @@
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(20, 20),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
window->Hide();
EXPECT_EQ(NULL,
ui::GestureRecognizer::Get()->GetTouchLockedTarget(&press1));
@@ -2911,7 +2911,7 @@
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
// Scroll around, to cancel the long press
tes.SendScrollEvent(dispatcher(), 130, 230, kTouchId, delegate.get());
@@ -2964,7 +2964,7 @@
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -2990,7 +2990,7 @@
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(130, 230),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -3018,7 +3018,7 @@
delegate->Reset();
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
tes.SendScrollEvent(dispatcher(), 131, 231, kTouchId1, delegate.get());
// First finger touches down and moves.
@@ -3031,7 +3031,7 @@
// Second finger touches down and moves.
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(130, 201),
kTouchId2, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
tes.SendScrollEvent(dispatcher(), 161, 231, kTouchId2, delegate.get());
// PinchBegin & ScrollBegin were not sent if the touch-move events were
@@ -3088,8 +3088,8 @@
kTouchId1, tes.Now());
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(130, 201),
kTouchId2, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_FALSE(delegate->tap());
// Touch release is not consumed, so we still see two finger tap.
@@ -3122,7 +3122,7 @@
delegate->Reset();
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -3189,7 +3189,7 @@
delegate->Reset();
ui::TouchEvent release(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_down());
EXPECT_FALSE(delegate->tap_cancel());
@@ -3216,19 +3216,19 @@
// First tap (tested in GestureEventTap)
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(104, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(104, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
delegate->Reset();
// Second tap
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(101, 203),
kTouchId, tes.LeapForward(200));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(102, 206),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_TRUE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
@@ -3257,10 +3257,10 @@
// First tap (tested in GestureEventTap)
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(104, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(104, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_EQ(1, delegate->tap_count());
delegate->Reset();
@@ -3268,10 +3268,10 @@
// Second tap (tested in GestureEventDoubleTap)
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(101, 203),
kTouchId, tes.LeapForward(200));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(102, 206),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_EQ(2, delegate->tap_count());
delegate->Reset();
@@ -3279,10 +3279,10 @@
// Third tap
ui::TouchEvent press3(ui::ET_TOUCH_PRESSED, gfx::Point(102, 206),
kTouchId, tes.LeapForward(200));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press3);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press3);
ui::TouchEvent release3(ui::ET_TOUCH_RELEASED, gfx::Point(102, 206),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release3);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release3);
EXPECT_TRUE(delegate->tap());
@@ -3312,19 +3312,19 @@
// First tap (tested in GestureEventTap)
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
delegate->Reset();
// Second tap, close in time but far in distance
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(201, 201),
kTouchId, tes.LeapForward(200));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(201, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_TRUE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
@@ -3354,19 +3354,19 @@
// First tap (tested in GestureEventTap)
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
delegate->Reset();
// Second tap, close in distance but after some delay
ui::TouchEvent press2(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(2000));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release2);
EXPECT_TRUE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
@@ -3396,7 +3396,7 @@
ui::TouchEvent press1(
ui::ET_TOUCH_PRESSED, gfx::Point(101, 201), kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->bounding_box().IsEmpty());
delegate->Reset();
@@ -3405,7 +3405,7 @@
ui::ET_TOUCH_PRESSED, gfx::Point(201, 201), kTouchId2,
tes.LeapForward(400));
press2.set_radius_x(5);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press2);
EXPECT_FALSE(delegate->pinch_begin());
EXPECT_EQ(gfx::Rect(101, 201, 100, 0).ToString(),
delegate->bounding_box().ToString());
@@ -3414,7 +3414,7 @@
ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(141, 201), kTouchId,
tes.LeapForward(40));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
EXPECT_TRUE(delegate->pinch_begin());
EXPECT_EQ(gfx::Rect(141, 201, 60, 0).ToString(),
delegate->bounding_box().ToString());
@@ -3426,7 +3426,7 @@
tes.LeapForward(40));
move2.set_radius_x(50);
move2.set_radius_y(60);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_FALSE(delegate->tap());
EXPECT_FALSE(delegate->tap_cancel());
EXPECT_FALSE(delegate->scroll_update());
@@ -3452,21 +3452,21 @@
ui::TouchEvent press1(
ui::ET_TOUCH_PRESSED, gfx::Point(101, 208), kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->begin());
delegate->Reset();
ui::TouchEvent move1(ui::ET_TOUCH_MOVED, gfx::Point(101, 206), kTouchId,
tes.LeapForward(40));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move1);
EXPECT_FALSE(delegate->scroll_begin());
delegate->Reset();
ui::TouchEvent move2(ui::ET_TOUCH_MOVED, gfx::Point(101, 204), kTouchId,
tes.LeapForward(40));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move2);
EXPECT_TRUE(delegate->tap_cancel());
EXPECT_TRUE(delegate->scroll_begin());
EXPECT_TRUE(delegate->scroll_update());
@@ -3476,14 +3476,14 @@
ui::TouchEvent move3(ui::ET_TOUCH_MOVED, gfx::Point(101, 204), kTouchId,
tes.LeapForward(40));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move3);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move3);
EXPECT_FALSE(delegate->scroll_update());
delegate->Reset();
ui::TouchEvent move4(ui::ET_TOUCH_MOVED, gfx::Point(101, 203), kTouchId,
tes.LeapForward(40));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&move4);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&move4);
EXPECT_TRUE(delegate->scroll_update());
EXPECT_EQ(-1, delegate->scroll_y());
@@ -3507,7 +3507,7 @@
kTouchId, tes.Now());
delegate->set_consume_touch_move(false);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
delegate->set_consume_touch_move(true);
delegate->Reset();
// Move the touch-point enough so that it would normally be considered a
@@ -3544,8 +3544,8 @@
ui::TouchEvent press(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
ui::TouchEvent p2(ui::ET_TOUCH_PRESSED, gfx::Point(50, 50), 1, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press);
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&p2);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&p2);
EXPECT_FALSE(delegate->tap());
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->tap_cancel());
@@ -3586,7 +3586,7 @@
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
EXPECT_TRUE(delegate->begin());
EXPECT_FALSE(delegate->tap_cancel());
@@ -3602,7 +3602,7 @@
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->long_press());
// Note the tap down isn't cancelled until the release
@@ -3634,7 +3634,7 @@
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
// We haven't pressed long enough for a show press to occur
@@ -3651,7 +3651,7 @@
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(10));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_FALSE(delegate->show_press());
EXPECT_FALSE(delegate->tap_cancel());
}
@@ -3672,7 +3672,7 @@
ui::TouchEvent press1(ui::ET_TOUCH_PRESSED, gfx::Point(101, 201),
kTouchId, tes.Now());
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&press1);
EXPECT_TRUE(delegate->tap_down());
// We haven't pressed long enough for a show press to occur
@@ -3682,7 +3682,7 @@
delegate->Reset();
ui::TouchEvent release1(ui::ET_TOUCH_RELEASED, gfx::Point(101, 201),
kTouchId, tes.LeapForward(50));
- dispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release1);
+ dispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent(&release1);
EXPECT_TRUE(delegate->show_press());
EXPECT_FALSE(delegate->tap_cancel());
EXPECT_TRUE(delegate->tap());
« no previous file with comments | « trunk/src/ui/aura/env.h ('k') | trunk/src/ui/aura/remote_root_window_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698