diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-19 21:51:26 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-19 21:51:26 +0000 |
commit | a657d1a593cbdde72d67d38c640fb1e7fc29c681 (patch) | |
tree | cc9bea090289bc4a04c3df57858ffa781ed29fc8 /ash/wm | |
parent | 30103b3e9b7a9211c1d705d3899060888f03e801 (diff) | |
download | chromium_src-a657d1a593cbdde72d67d38c640fb1e7fc29c681.zip chromium_src-a657d1a593cbdde72d67d38c640fb1e7fc29c681.tar.gz chromium_src-a657d1a593cbdde72d67d38c640fb1e7fc29c681.tar.bz2 |
Rename RootWindowHost* to WindowTreeHost*
TBR=sky@chromium.org
http://crbug.com/308843
Review URL: https://codereview.chromium.org/76583003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236048 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm')
-rw-r--r-- | ash/wm/caption_buttons/frame_maximize_button_unittest.cc | 4 | ||||
-rw-r--r-- | ash/wm/lock_state_controller.cc | 2 | ||||
-rw-r--r-- | ash/wm/lock_state_controller.h | 2 | ||||
-rw-r--r-- | ash/wm/sticky_keys.cc | 4 | ||||
-rw-r--r-- | ash/wm/system_gesture_event_filter_unittest.cc | 2 | ||||
-rw-r--r-- | ash/wm/window_manager_unittest.cc | 50 | ||||
-rw-r--r-- | ash/wm/workspace/workspace_event_handler_unittest.cc | 4 |
7 files changed, 34 insertions, 34 deletions
diff --git a/ash/wm/caption_buttons/frame_maximize_button_unittest.cc b/ash/wm/caption_buttons/frame_maximize_button_unittest.cc index c2ea2e8..d51738b 100644 --- a/ash/wm/caption_buttons/frame_maximize_button_unittest.cc +++ b/ash/wm/caption_buttons/frame_maximize_button_unittest.cc @@ -550,7 +550,7 @@ TEST_F(FrameMaximizeButtonTest, MaximizeTap) { button_pos, kTouchId, ui::EventTimeForNow()); - dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&press); + dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press); button_pos.Offset(9, 8); ui::TouchEvent release( @@ -558,7 +558,7 @@ TEST_F(FrameMaximizeButtonTest, MaximizeTap) { button_pos, kTouchId, press.time_stamp() + base::TimeDelta::FromMilliseconds(50)); - dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&release); + dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release); ui::GestureConfiguration::set_default_radius(touch_default_radius); } diff --git a/ash/wm/lock_state_controller.cc b/ash/wm/lock_state_controller.cc index 9b5a5b5..2fa948b 100644 --- a/ash/wm/lock_state_controller.cc +++ b/ash/wm/lock_state_controller.cc @@ -287,7 +287,7 @@ void LockStateController::SetLockScreenDisplayedCallback( lock_screen_displayed_callback_ = callback; } -void LockStateController::OnRootWindowHostCloseRequested( +void LockStateController::OnWindowTreeHostCloseRequested( const aura::RootWindow*) { Shell::GetInstance()->delegate()->Exit(); } diff --git a/ash/wm/lock_state_controller.h b/ash/wm/lock_state_controller.h index c2e7a6a..bcfd64f 100644 --- a/ash/wm/lock_state_controller.h +++ b/ash/wm/lock_state_controller.h @@ -198,7 +198,7 @@ class ASH_EXPORT LockStateController : public aura::RootWindowObserver, void SetLockScreenDisplayedCallback(const base::Closure& callback); // RootWindowObserver override: - virtual void OnRootWindowHostCloseRequested( + virtual void OnWindowTreeHostCloseRequested( const aura::RootWindow* root) OVERRIDE; // ShellObserver overrides: diff --git a/ash/wm/sticky_keys.cc b/ash/wm/sticky_keys.cc index 10e828a..8dbee55 100644 --- a/ash/wm/sticky_keys.cc +++ b/ash/wm/sticky_keys.cc @@ -54,7 +54,7 @@ StickyKeysHandlerDelegateImpl::~StickyKeysHandlerDelegateImpl() { void StickyKeysHandlerDelegateImpl::DispatchKeyEvent(ui::KeyEvent* event, aura::Window* target) { DCHECK(target); - target->GetDispatcher()->AsRootWindowHostDelegate()->OnHostKeyEvent(event); + target->GetDispatcher()->AsWindowTreeHostDelegate()->OnHostKeyEvent(event); } void StickyKeysHandlerDelegateImpl::DispatchMouseEvent(ui::MouseEvent* event, @@ -62,7 +62,7 @@ void StickyKeysHandlerDelegateImpl::DispatchMouseEvent(ui::MouseEvent* event, DCHECK(target); // We need to send a new, untransformed mouse event to the host. ui::MouseEvent release_event(*event, target, target->GetRootWindow()); - target->GetDispatcher()->AsRootWindowHostDelegate() + target->GetDispatcher()->AsWindowTreeHostDelegate() ->OnHostMouseEvent(&release_event); } diff --git a/ash/wm/system_gesture_event_filter_unittest.cc b/ash/wm/system_gesture_event_filter_unittest.cc index 66cc681..2a87892 100644 --- a/ash/wm/system_gesture_event_filter_unittest.cc +++ b/ash/wm/system_gesture_event_filter_unittest.cc @@ -255,7 +255,7 @@ TEST_P(SystemGestureEventFilterTest, LongPressAffordanceStateOnCaptureLoss) { gfx::Point(10, 10), kTouchId, ui::EventTimeForNow()); - root_window->GetDispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent( + root_window->GetDispatcher()->AsWindowTreeHostDelegate()->OnHostTouchEvent( &press); EXPECT_TRUE(window1->HasCapture()); diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc index 65c2f97..30d2bd7 100644 --- a/ash/wm/window_manager_unittest.cc +++ b/ash/wm/window_manager_unittest.cc @@ -187,19 +187,19 @@ TEST_F(WindowManagerTest, Focus) { // The key press should be sent to the focused sub-window. ui::KeyEvent keyev(ui::ET_KEY_PRESSED, ui::VKEY_E, 0, false); - dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev); + dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&keyev); EXPECT_EQ(ui::VKEY_E, w121delegate->last_key_code()); // Touch on a sub-window (w122) to focus it. gfx::Point click_point = w122->bounds().CenterPoint(); aura::Window::ConvertPointToTarget(w122->parent(), root_window, &click_point); ui::TouchEvent touchev(ui::ET_TOUCH_PRESSED, click_point, 0, getTime()); - dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev); + dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&touchev); focus_client = aura::client::GetFocusClient(w122.get()); EXPECT_EQ(w122.get(), focus_client->GetFocusedWindow()); // The key press should be sent to the focused sub-window. - dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev); + dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&keyev); EXPECT_EQ(ui::VKEY_E, w122delegate->last_key_code()); // Hiding the focused window will set the focus to its parent if @@ -236,7 +236,7 @@ TEST_F(WindowManagerTest, Focus) { EXPECT_EQ(aura::client::GetFocusClient(w12.get()), aura::client::GetFocusClient(w123.get())); EXPECT_EQ(NULL, aura::client::GetFocusClient(w12.get())->GetFocusedWindow()); - EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev)); + EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&keyev)); // Set the focus back to w123 aura::client::SetActivationDelegate(w1.get(), NULL); @@ -250,7 +250,7 @@ TEST_F(WindowManagerTest, Focus) { // parent window is not focusable. w12->RemoveChild(w123.get()); EXPECT_EQ(NULL, aura::client::GetFocusClient(w123.get())); - EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&keyev)); + EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&keyev)); } // Various assertion testing for activating windows. @@ -442,7 +442,7 @@ TEST_F(WindowManagerTest, ActivateOnTouch) { ui::TouchEvent touchev1(ui::ET_TOUCH_PRESSED, press_point, 0, getTime()); aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher(); - dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev1); + dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&touchev1); // Window2 should have become active. EXPECT_TRUE(wm::IsActiveWindow(w2.get())); @@ -459,7 +459,7 @@ TEST_F(WindowManagerTest, ActivateOnTouch) { aura::Window::ConvertPointToTarget(w1->parent(), root_window, &press_point); d1.set_activate(false); ui::TouchEvent touchev2(ui::ET_TOUCH_PRESSED, press_point, 1, getTime()); - dispatcher->AsRootWindowHostDelegate()->OnHostTouchEvent(&touchev2); + dispatcher->AsWindowTreeHostDelegate()->OnHostTouchEvent(&touchev2); // Window2 should still be active and focused. EXPECT_TRUE(wm::IsActiveWindow(w2.get())); @@ -510,14 +510,14 @@ TEST_F(WindowManagerTest, MouseEventCursors) { // Resize edges and corners show proper cursors. window_delegate.set_hittest_code(HTBOTTOM); ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1); EXPECT_EQ(ui::kCursorSouthResize, dispatcher->last_cursor().native_type()); } { window_delegate.set_hittest_code(HTBOTTOMLEFT); ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0x0); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move2); EXPECT_EQ(ui::kCursorSouthWestResize, dispatcher->last_cursor().native_type()); } @@ -525,7 +525,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) { { window_delegate.set_hittest_code(HTBOTTOMRIGHT); ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1); EXPECT_EQ(ui::kCursorSouthEastResize, dispatcher->last_cursor().native_type()); } @@ -533,28 +533,28 @@ TEST_F(WindowManagerTest, MouseEventCursors) { { window_delegate.set_hittest_code(HTLEFT); ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0x0); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move2); EXPECT_EQ(ui::kCursorWestResize, dispatcher->last_cursor().native_type()); } { window_delegate.set_hittest_code(HTRIGHT); ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1); EXPECT_EQ(ui::kCursorEastResize, dispatcher->last_cursor().native_type()); } { window_delegate.set_hittest_code(HTTOP); ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0x0); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move2); EXPECT_EQ(ui::kCursorNorthResize, dispatcher->last_cursor().native_type()); } { window_delegate.set_hittest_code(HTTOPLEFT); ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1); EXPECT_EQ(ui::kCursorNorthWestResize, dispatcher->last_cursor().native_type()); } @@ -562,7 +562,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) { { window_delegate.set_hittest_code(HTTOPRIGHT); ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2, 0x0); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move2); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move2); EXPECT_EQ(ui::kCursorNorthEastResize, dispatcher->last_cursor().native_type()); } @@ -571,7 +571,7 @@ TEST_F(WindowManagerTest, MouseEventCursors) { // Client area uses null cursor. window_delegate.set_hittest_code(HTCLIENT); ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1, 0x0); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&move1); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1); EXPECT_EQ(ui::kCursorNull, dispatcher->last_cursor().native_type()); } } @@ -608,13 +608,13 @@ TEST_F(WindowManagerTest, MAYBE_TransformActivate) { miss_point, ui::EF_LEFT_MOUSE_BUTTON); aura::WindowEventDispatcher* dispatcher = root_window->GetDispatcher(); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouseev1); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouseev1); EXPECT_EQ(NULL, aura::client::GetFocusClient(w1.get())->GetFocusedWindow()); ui::MouseEvent mouseup(ui::ET_MOUSE_RELEASED, miss_point, miss_point, ui::EF_LEFT_MOUSE_BUTTON); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouseup); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouseup); gfx::Point hit_point(5, 15); transform.TransformPoint(&hit_point); @@ -622,7 +622,7 @@ TEST_F(WindowManagerTest, MAYBE_TransformActivate) { hit_point, hit_point, ui::EF_LEFT_MOUSE_BUTTON); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouseev2); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouseev2); EXPECT_TRUE(wm::IsActiveWindow(w1.get())); EXPECT_EQ(w1.get(), aura::client::GetFocusClient(w1.get())->GetFocusedWindow()); @@ -655,10 +655,10 @@ 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->GetDispatcher(); - dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event); + dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&key_event); ui::MouseEvent mouse_pressed( ui::ET_MOUSE_PRESSED, gfx::Point(0, 0), gfx::Point(0, 0), 0x0); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_pressed); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse_pressed); // Both filters should get the events. EXPECT_EQ(1, f1->num_key_events()); @@ -674,10 +674,10 @@ TEST_F(WindowManagerTest, AdditionalFilters) { f1->set_mouse_event_handling_result(ui::ER_CONSUMED); // Dispatches events. - dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event); + dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&key_event); ui::MouseEvent mouse_released( ui::ET_MOUSE_RELEASED, gfx::Point(0, 0), gfx::Point(0, 0), 0x0); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_released); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse_released); // f1 should still get the events but f2 no longer gets them. EXPECT_EQ(1, f1->num_key_events()); @@ -692,8 +692,8 @@ TEST_F(WindowManagerTest, AdditionalFilters) { env_filter->RemoveHandler(f1.get()); // Dispatches events. - dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouse_pressed); + dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent(&key_event); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse_pressed); // f1 should get no events since it's out and f2 should get them. EXPECT_EQ(0, f1->num_key_events()); diff --git a/ash/wm/workspace/workspace_event_handler_unittest.cc b/ash/wm/workspace/workspace_event_handler_unittest.cc index feec4bd..887e914 100644 --- a/ash/wm/workspace/workspace_event_handler_unittest.cc +++ b/ash/wm/workspace/workspace_event_handler_unittest.cc @@ -273,11 +273,11 @@ TEST_F(WorkspaceEventHandlerTest, DoubleClickCaptionTogglesMaximize) { generator.current_location(), ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_IS_DOUBLE_CLICK); aura::WindowEventDispatcher* dispatcher = root->GetDispatcher(); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&press); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&press); ui::MouseEvent release(ui::ET_MOUSE_RELEASED, generator.current_location(), generator.current_location(), ui::EF_IS_DOUBLE_CLICK); - dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&release); + dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&release); EXPECT_FALSE(window_state->IsMaximized()); EXPECT_EQ("1,2 30x40", window->bounds().ToString()); |