diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-20 01:41:51 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-20 01:41:51 +0000 |
commit | 8520ebd2d0fad750b0841f4d8dae1e517f0c400f (patch) | |
tree | 0d95131d2dd9ee39aa931034484e0a89797d591b /ash | |
parent | f0c4809951a377e88d6b0c19a97cd50dab5d1f10 (diff) | |
download | chromium_src-8520ebd2d0fad750b0841f4d8dae1e517f0c400f.zip chromium_src-8520ebd2d0fad750b0841f4d8dae1e517f0c400f.tar.gz chromium_src-8520ebd2d0fad750b0841f4d8dae1e517f0c400f.tar.bz2 |
Revert 236048 "Rename RootWindowHost* to WindowTreeHost*"
> Rename RootWindowHost* to WindowTreeHost*
>
> TBR=sky@chromium.org
> http://crbug.com/308843
>
> Review URL: https://codereview.chromium.org/76583003
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/77203002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
29 files changed, 90 insertions, 90 deletions
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc index 3030eb4..31df7e3 100644 --- a/ash/accelerators/accelerator_controller_unittest.cc +++ b/ash/accelerators/accelerator_controller_unittest.cc @@ -615,17 +615,17 @@ TEST_F(AcceleratorControllerTest, MAYBE_ProcessOnce) { #if defined(OS_WIN) MSG msg1 = { NULL, WM_KEYDOWN, ui::VKEY_A, 0 }; ui::TranslatedKeyEvent key_event1(msg1, false); - EXPECT_TRUE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent( + EXPECT_TRUE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent( &key_event1)); MSG msg2 = { NULL, WM_CHAR, L'A', 0 }; ui::TranslatedKeyEvent key_event2(msg2, true); - EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent( + EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent( &key_event2)); MSG msg3 = { NULL, WM_KEYUP, ui::VKEY_A, 0 }; ui::TranslatedKeyEvent key_event3(msg3, false); - EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent( + EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent( &key_event3)); #elif defined(USE_X11) XEvent key_event; @@ -634,11 +634,11 @@ TEST_F(AcceleratorControllerTest, MAYBE_ProcessOnce) { 0, &key_event); ui::TranslatedKeyEvent key_event1(&key_event, false); - EXPECT_TRUE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent( + EXPECT_TRUE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent( &key_event1)); ui::TranslatedKeyEvent key_event2(&key_event, true); - EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent( + EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent( &key_event2)); ui::InitXKeyEventForTesting(ui::ET_KEY_RELEASED, @@ -646,7 +646,7 @@ TEST_F(AcceleratorControllerTest, MAYBE_ProcessOnce) { 0, &key_event); ui::TranslatedKeyEvent key_event3(&key_event, false); - EXPECT_FALSE(dispatcher->AsWindowTreeHostDelegate()->OnHostKeyEvent( + EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent( &key_event3)); #endif EXPECT_EQ(1, target.accelerator_pressed_count()); diff --git a/ash/autoclick/autoclick_controller.cc b/ash/autoclick/autoclick_controller.cc index 7867484..d09cbce 100644 --- a/ash/autoclick/autoclick_controller.cc +++ b/ash/autoclick/autoclick_controller.cc @@ -197,8 +197,8 @@ void AutoclickControllerImpl::DoAutoclick() { click_location, mouse_event_flags_ | ui::EF_LEFT_MOUSE_BUTTON); - dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&press_event); - dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&release_event); + dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&press_event); + dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&release_event); } // static. diff --git a/ash/cancel_mode.cc b/ash/cancel_mode.cc index 64c352e..df775d2 100644 --- a/ash/cancel_mode.cc +++ b/ash/cancel_mode.cc @@ -15,7 +15,7 @@ void DispatchCancelMode() { Shell::GetAllRootWindowControllers()); for (Shell::RootWindowControllerList::const_iterator i = controllers.begin(); i != controllers.end(); ++i) { - (*i)->dispatcher()->AsWindowTreeHostDelegate()->OnHostCancelMode(); + (*i)->dispatcher()->AsRootWindowHostDelegate()->OnHostCancelMode(); } } diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc index 6b47921..09927b3 100644 --- a/ash/display/display_controller.cc +++ b/ash/display/display_controller.cc @@ -671,7 +671,7 @@ void DisplayController::OnDisplayRemoved(const gfx::Display& display) { base::MessageLoop::current()->DeleteSoon(FROM_HERE, controller); } -void DisplayController::OnWindowTreeHostResized(const aura::RootWindow* root) { +void DisplayController::OnRootWindowHostResized(const aura::RootWindow* root) { internal::DisplayManager* display_manager = GetDisplayManager(); gfx::Display display = GetDisplayNearestWindow(root->window()); if (display_manager->UpdateDisplayBounds( @@ -757,7 +757,7 @@ aura::RootWindow* DisplayController::AddRootWindowForDisplay( const gfx::Rect& bounds_in_native = display_info.bounds_in_native(); aura::RootWindow::CreateParams params(bounds_in_native); params.host = Shell::GetInstance()->root_window_host_factory()-> - CreateWindowTreeHost(bounds_in_native); + CreateRootWindowHost(bounds_in_native); aura::RootWindow* root_window = new aura::RootWindow(params); root_window->window()->SetName( base::StringPrintf("RootWindow-%d", root_window_count++)); diff --git a/ash/display/display_controller.h b/ash/display/display_controller.h index dcc78ed..75fe22c 100644 --- a/ash/display/display_controller.h +++ b/ash/display/display_controller.h @@ -162,7 +162,7 @@ class ASH_EXPORT DisplayController : public gfx::DisplayObserver, virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE; // RootWindowObserver overrides: - virtual void OnWindowTreeHostResized(const aura::RootWindow* root) OVERRIDE; + virtual void OnRootWindowHostResized(const aura::RootWindow* root) OVERRIDE; // aura::DisplayManager::Delegate overrides: virtual void CreateOrUpdateNonDesktopDisplay( diff --git a/ash/display/display_info.cc b/ash/display/display_info.cc index 26d7c997..ec48f31 100644 --- a/ash/display/display_info.cc +++ b/ash/display/display_info.cc @@ -45,7 +45,7 @@ DisplayInfo DisplayInfo::CreateFromSpecWithID(const std::string& spec, static int64 synthesized_display_id = 2200000000LL; #if defined(OS_WIN) - gfx::Rect bounds_in_native(aura::WindowTreeHost::GetNativeScreenSize()); + gfx::Rect bounds_in_native(aura::RootWindowHost::GetNativeScreenSize()); #else gfx::Rect bounds_in_native(kDefaultHostWindowX, kDefaultHostWindowY, kDefaultHostWindowWidth, kDefaultHostWindowHeight); diff --git a/ash/display/mirror_window_controller.cc b/ash/display/mirror_window_controller.cc index 7dcde64..9a16898 100644 --- a/ash/display/mirror_window_controller.cc +++ b/ash/display/mirror_window_controller.cc @@ -164,7 +164,7 @@ void MirrorWindowController::UpdateWindow(const DisplayInfo& display_info) { const gfx::Rect& bounds_in_native = display_info.bounds_in_native(); aura::RootWindow::CreateParams params(bounds_in_native); params.host = Shell::GetInstance()->root_window_host_factory()-> - CreateWindowTreeHost(bounds_in_native); + CreateRootWindowHost(bounds_in_native); root_window_.reset(new aura::RootWindow(params)); root_window_->window()->SetName( base::StringPrintf("MirrorRootWindow-%d", mirror_root_window_count++)); @@ -318,7 +318,7 @@ void MirrorWindowController::SetMirroredCursorVisibility(bool visible) { visible ? cursor_window_->Show() : cursor_window_->Hide(); } -void MirrorWindowController::OnWindowTreeHostResized( +void MirrorWindowController::OnRootWindowHostResized( const aura::RootWindow* root) { // Do not use |old_size| as it contains RootWindow's (but not host's) size, // and this parameter wil be removed soon. diff --git a/ash/display/mirror_window_controller.h b/ash/display/mirror_window_controller.h index 86773f1..13460d7 100644 --- a/ash/display/mirror_window_controller.h +++ b/ash/display/mirror_window_controller.h @@ -60,7 +60,7 @@ class ASH_EXPORT MirrorWindowController : public aura::RootWindowObserver { void SetMirroredCursorVisibility(bool visible); // aura::RootWindowObserver overrides: - virtual void OnWindowTreeHostResized(const aura::RootWindow* root) OVERRIDE; + virtual void OnRootWindowHostResized(const aura::RootWindow* root) OVERRIDE; private: friend class test::MirrorWindowTestApi; diff --git a/ash/display/virtual_keyboard_window_controller.cc b/ash/display/virtual_keyboard_window_controller.cc index 9a76b0a..7be0e47 100644 --- a/ash/display/virtual_keyboard_window_controller.cc +++ b/ash/display/virtual_keyboard_window_controller.cc @@ -41,7 +41,7 @@ void VirtualKeyboardWindowController::UpdateWindow( const gfx::Rect& bounds_in_native = display_info.bounds_in_native(); aura::RootWindow::CreateParams params(bounds_in_native); params.host = Shell::GetInstance()->root_window_host_factory()-> - CreateWindowTreeHost(bounds_in_native); + CreateRootWindowHost(bounds_in_native); aura::RootWindow* root_window = new aura::RootWindow(params); root_window->window()->SetName( diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc index 8b6044d..baf5acb 100644 --- a/ash/drag_drop/drag_drop_controller_unittest.cc +++ b/ash/drag_drop/drag_drop_controller_unittest.cc @@ -737,7 +737,7 @@ TEST_F(DragDropControllerTest, SyntheticEventsDuringDragDrop) { gfx::Point mouse_move_location = drag_view->bounds().CenterPoint(); ui::MouseEvent mouse_move(ui::ET_MOUSE_MOVED, mouse_move_location, mouse_move_location, 0); - Shell::GetPrimaryRootWindow()->GetDispatcher()->AsWindowTreeHostDelegate()-> + Shell::GetPrimaryRootWindow()->GetDispatcher()->AsRootWindowHostDelegate()-> OnHostMouseEvent(&mouse_move); } diff --git a/ash/host/root_window_host_factory.cc b/ash/host/root_window_host_factory.cc index 27bb614..1f4cb3d 100644 --- a/ash/host/root_window_host_factory.cc +++ b/ash/host/root_window_host_factory.cc @@ -8,14 +8,14 @@ namespace { -class WindowTreeHostFactoryImpl : public ash::WindowTreeHostFactory { +class RootWindowHostFactoryImpl : public ash::RootWindowHostFactory { public: - WindowTreeHostFactoryImpl() {} + RootWindowHostFactoryImpl() {} - // Overridden from WindowTreeHostFactory: - virtual aura::WindowTreeHost* CreateWindowTreeHost( + // Overridden from RootWindowHostFactory: + virtual aura::RootWindowHost* CreateRootWindowHost( const gfx::Rect& initial_bounds) OVERRIDE { - return aura::WindowTreeHost::Create(initial_bounds); + return aura::RootWindowHost::Create(initial_bounds); } }; @@ -24,8 +24,8 @@ class WindowTreeHostFactoryImpl : public ash::WindowTreeHostFactory { namespace ash { // static -WindowTreeHostFactory* WindowTreeHostFactory::Create() { - return new WindowTreeHostFactoryImpl; +RootWindowHostFactory* RootWindowHostFactory::Create() { + return new RootWindowHostFactoryImpl; } } // namespace ash diff --git a/ash/host/root_window_host_factory.h b/ash/host/root_window_host_factory.h index d956628..d357d9b 100644 --- a/ash/host/root_window_host_factory.h +++ b/ash/host/root_window_host_factory.h @@ -9,23 +9,23 @@ #include "ui/gfx/rect.h" namespace aura { -class WindowTreeHost; +class RootWindowHost; } namespace ash { -class ASH_EXPORT WindowTreeHostFactory { +class ASH_EXPORT RootWindowHostFactory { public: - virtual ~WindowTreeHostFactory() {} + virtual ~RootWindowHostFactory() {} - static WindowTreeHostFactory* Create(); + static RootWindowHostFactory* Create(); - // Creates a new aura::WindowTreeHost. The caller owns the returned value. - virtual aura::WindowTreeHost* CreateWindowTreeHost( + // Creates a new aura::RootWindowHost. The caller owns the returned value. + virtual aura::RootWindowHost* CreateRootWindowHost( const gfx::Rect& initial_bounds) = 0; protected: - WindowTreeHostFactory() {} + RootWindowHostFactory() {} }; } // namespace ash diff --git a/ash/host/root_window_host_factory_win.cc b/ash/host/root_window_host_factory_win.cc index a072a85..3255f64 100644 --- a/ash/host/root_window_host_factory_win.cc +++ b/ash/host/root_window_host_factory_win.cc @@ -12,19 +12,19 @@ namespace { -class WindowTreeHostFactoryImpl : public ash::WindowTreeHostFactory { +class RootWindowHostFactoryImpl : public ash::RootWindowHostFactory { public: - WindowTreeHostFactoryImpl() {} + RootWindowHostFactoryImpl() {} - // Overridden from WindowTreeHostFactory: - virtual aura::WindowTreeHost* CreateWindowTreeHost( + // Overridden from RootWindowHostFactory: + virtual aura::RootWindowHost* CreateRootWindowHost( const gfx::Rect& initial_bounds) OVERRIDE { if (base::win::GetVersion() >= base::win::VERSION_WIN8 && !CommandLine::ForCurrentProcess()->HasSwitch( ash::switches::kForceAshToDesktop)) - return aura::RemoteWindowTreeHostWin::Create(initial_bounds); + return aura::RemoteRootWindowHostWin::Create(initial_bounds); - return aura::WindowTreeHost::Create(initial_bounds); + return aura::RootWindowHost::Create(initial_bounds); } }; @@ -33,8 +33,8 @@ class WindowTreeHostFactoryImpl : public ash::WindowTreeHostFactory { namespace ash { // static -WindowTreeHostFactory* WindowTreeHostFactory::Create() { - return new WindowTreeHostFactoryImpl; +RootWindowHostFactory* RootWindowHostFactory::Create() { + return new RootWindowHostFactoryImpl; } } // namespace ash diff --git a/ash/shell.cc b/ash/shell.cc index e7fb428..d5428cf 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -761,7 +761,7 @@ void Shell::Init() { focus_cycler_.reset(new internal::FocusCycler()); screen_position_controller_.reset(new internal::ScreenPositionController); - root_window_host_factory_.reset(delegate_->CreateWindowTreeHostFactory()); + root_window_host_factory_.reset(delegate_->CreateRootWindowHostFactory()); display_controller_->Start(); display_controller_->InitPrimaryDisplay(); diff --git a/ash/shell.h b/ash/shell.h index f11f1ce..1c4e779 100644 --- a/ash/shell.h +++ b/ash/shell.h @@ -96,7 +96,7 @@ class NestedDispatcherController; class NewWindowDelegate; class PartialMagnificationController; class PowerButtonController; -class WindowTreeHostFactory; +class RootWindowHostFactory; class ScreenAsh; class SessionStateDelegate; class ShelfModel; @@ -499,7 +499,7 @@ class ASH_EXPORT Shell return resolution_notification_controller_.get(); } - WindowTreeHostFactory* root_window_host_factory() { + RootWindowHostFactory* root_window_host_factory() { return root_window_host_factory_.get(); } @@ -636,7 +636,7 @@ class ASH_EXPORT Shell scoped_ptr<internal::EventClientImpl> event_client_; scoped_ptr<internal::EventTransformationHandler> event_transformation_handler_; - scoped_ptr<WindowTreeHostFactory> root_window_host_factory_; + scoped_ptr<RootWindowHostFactory> root_window_host_factory_; // An event filter that rewrites or drops an event. scoped_ptr<internal::EventRewriterEventFilter> event_rewriter_filter_; diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index ebe2d83..acc8e3d 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc @@ -165,8 +165,8 @@ ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::Window* root) { return new ContextMenu(root); } -WindowTreeHostFactory* ShellDelegateImpl::CreateWindowTreeHostFactory() { - return WindowTreeHostFactory::Create(); +RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { + return RootWindowHostFactory::Create(); } base::string16 ShellDelegateImpl::GetProductName() const { diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h index 71d080a..500bef2 100644 --- a/ash/shell/shell_delegate_impl.h +++ b/ash/shell/shell_delegate_impl.h @@ -57,7 +57,7 @@ class ShellDelegateImpl : public ash::ShellDelegate { virtual void RecordUserMetricsAction(UserMetricsAction action) OVERRIDE; virtual ui::MenuModel* CreateContextMenu( aura::Window* root_window) OVERRIDE; - virtual WindowTreeHostFactory* CreateWindowTreeHostFactory() OVERRIDE; + virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE; virtual base::string16 GetProductName() const OVERRIDE; private: diff --git a/ash/shell_delegate.h b/ash/shell_delegate.h index 2f32a0f..afe8101 100644 --- a/ash/shell_delegate.h +++ b/ash/shell_delegate.h @@ -48,7 +48,7 @@ class LauncherDelegate; struct LauncherItem; class MediaDelegate; class NewWindowDelegate; -class WindowTreeHostFactory; +class RootWindowHostFactory; class SessionStateDelegate; class ShelfModel; class SystemTrayDelegate; @@ -189,7 +189,7 @@ class ASH_EXPORT ShellDelegate { // Creates a root window host factory. Shell takes ownership of the returned // value. - virtual WindowTreeHostFactory* CreateWindowTreeHostFactory() = 0; + virtual RootWindowHostFactory* CreateRootWindowHostFactory() = 0; // Get the product name. virtual base::string16 GetProductName() const = 0; diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc index d8f682d2..be27c7d 100644 --- a/ash/test/ash_test_base.cc +++ b/ash/test/ash_test_base.cc @@ -140,8 +140,8 @@ void AshTestBase::SetUp() { CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection( win8::test::kDefaultTestAppUserModelId, L"test_open")); - aura::RemoteWindowTreeHostWin* root_window_host = - aura::RemoteWindowTreeHostWin::Instance(); + aura::RemoteRootWindowHostWin* root_window_host = + aura::RemoteRootWindowHostWin::Instance(); CHECK(root_window_host != NULL); } #endif diff --git a/ash/test/test_metro_viewer_process_host.cc b/ash/test/test_metro_viewer_process_host.cc index 4bdfb6c..3a58433 100644 --- a/ash/test/test_metro_viewer_process_host.cc +++ b/ash/test/test_metro_viewer_process_host.cc @@ -23,14 +23,14 @@ TestMetroViewerProcessHost::~TestMetroViewerProcessHost() { void TestMetroViewerProcessHost::OnChannelError() { closed_unexpectedly_ = true; - aura::RemoteWindowTreeHostWin::Instance()->Disconnected(); + aura::RemoteRootWindowHostWin::Instance()->Disconnected(); } void TestMetroViewerProcessHost::OnSetTargetSurface( gfx::NativeViewId target_surface) { DLOG(INFO) << __FUNCTION__ << ", target_surface = " << target_surface; HWND hwnd = reinterpret_cast<HWND>(target_surface); - aura::RemoteWindowTreeHostWin::Instance()->Connected(this, hwnd); + aura::RemoteRootWindowHostWin::Instance()->Connected(this, hwnd); backing_surface_.reset(new AcceleratedSurface(hwnd)); } diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc index 7810b0d..40284d9 100644 --- a/ash/test/test_shell_delegate.cc +++ b/ash/test/test_shell_delegate.cc @@ -146,8 +146,8 @@ ui::MenuModel* TestShellDelegate::CreateContextMenu(aura::Window* root) { return NULL; } -WindowTreeHostFactory* TestShellDelegate::CreateWindowTreeHostFactory() { - return WindowTreeHostFactory::Create(); +RootWindowHostFactory* TestShellDelegate::CreateRootWindowHostFactory() { + return RootWindowHostFactory::Create(); } base::string16 TestShellDelegate::GetProductName() const { diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h index 29e88d7..3edd95c 100644 --- a/ash/test/test_shell_delegate.h +++ b/ash/test/test_shell_delegate.h @@ -52,7 +52,7 @@ class TestShellDelegate : public ShellDelegate { virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE; virtual void RecordUserMetricsAction(UserMetricsAction action) OVERRIDE; virtual ui::MenuModel* CreateContextMenu(aura::Window* root) OVERRIDE; - virtual WindowTreeHostFactory* CreateWindowTreeHostFactory() OVERRIDE; + virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE; virtual base::string16 GetProductName() const OVERRIDE; int num_exit_requests() const { return num_exit_requests_; } diff --git a/ash/wm/caption_buttons/frame_maximize_button_unittest.cc b/ash/wm/caption_buttons/frame_maximize_button_unittest.cc index d51738b..c2ea2e8 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->AsWindowTreeHostDelegate()->OnHostTouchEvent(&press); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostTouchEvent(&release); + dispatcher->AsRootWindowHostDelegate()->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 2fa948b..9b5a5b5 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::OnWindowTreeHostCloseRequested( +void LockStateController::OnRootWindowHostCloseRequested( const aura::RootWindow*) { Shell::GetInstance()->delegate()->Exit(); } diff --git a/ash/wm/lock_state_controller.h b/ash/wm/lock_state_controller.h index bcfd64f..c2e7a6a 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 OnWindowTreeHostCloseRequested( + virtual void OnRootWindowHostCloseRequested( const aura::RootWindow* root) OVERRIDE; // ShellObserver overrides: diff --git a/ash/wm/sticky_keys.cc b/ash/wm/sticky_keys.cc index 8dbee55..10e828a 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()->AsWindowTreeHostDelegate()->OnHostKeyEvent(event); + target->GetDispatcher()->AsRootWindowHostDelegate()->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()->AsWindowTreeHostDelegate() + target->GetDispatcher()->AsRootWindowHostDelegate() ->OnHostMouseEvent(&release_event); } diff --git a/ash/wm/system_gesture_event_filter_unittest.cc b/ash/wm/system_gesture_event_filter_unittest.cc index 2a87892..66cc681 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()->AsWindowTreeHostDelegate()->OnHostTouchEvent( + root_window->GetDispatcher()->AsRootWindowHostDelegate()->OnHostTouchEvent( &press); EXPECT_TRUE(window1->HasCapture()); diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc index 30d2bd7..65c2f97 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->AsWindowTreeHostDelegate()->OnHostKeyEvent(&keyev); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostTouchEvent(&touchev); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostKeyEvent(&keyev); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostKeyEvent(&keyev)); + EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostKeyEvent(&keyev)); + EXPECT_FALSE(dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostTouchEvent(&touchev1); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostTouchEvent(&touchev2); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move2); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move2); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move2); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move2); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostMouseEvent(&move1); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouseev1); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouseup); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouseev2); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostKeyEvent(&key_event); + dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event); ui::MouseEvent mouse_pressed( ui::ET_MOUSE_PRESSED, gfx::Point(0, 0), gfx::Point(0, 0), 0x0); - dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse_pressed); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostKeyEvent(&key_event); + dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event); ui::MouseEvent mouse_released( ui::ET_MOUSE_RELEASED, gfx::Point(0, 0), gfx::Point(0, 0), 0x0); - dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse_released); + dispatcher->AsRootWindowHostDelegate()->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->AsWindowTreeHostDelegate()->OnHostKeyEvent(&key_event); - dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&mouse_pressed); + dispatcher->AsRootWindowHostDelegate()->OnHostKeyEvent(&key_event); + dispatcher->AsRootWindowHostDelegate()->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 887e914..feec4bd 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->AsWindowTreeHostDelegate()->OnHostMouseEvent(&press); + dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&press); ui::MouseEvent release(ui::ET_MOUSE_RELEASED, generator.current_location(), generator.current_location(), ui::EF_IS_DOUBLE_CLICK); - dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&release); + dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&release); EXPECT_FALSE(window_state->IsMaximized()); EXPECT_EQ("1,2 30x40", window->bounds().ToString()); |