diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-04 03:42:27 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-04 03:42:27 +0000 |
commit | 2374d1813659c2420eda25c884c5f943b292a64d (patch) | |
tree | 580d99257dd5a9d6a84de4fa70d583d17e985b4c /ash/accelerators | |
parent | b5126da4daa8f0f0f408afb93e0683f1cf34c82a (diff) | |
download | chromium_src-2374d1813659c2420eda25c884c5f943b292a64d.zip chromium_src-2374d1813659c2420eda25c884c5f943b292a64d.tar.gz chromium_src-2374d1813659c2420eda25c884c5f943b292a64d.tar.bz2 |
Window ownership -> WindowTreeHost
Replaces Window::GetDispatcher with Window::GetHost().
Had to clear ScreenPositionClient property prior to window teardown as tests on desktop delete it prior to destroying the window hierarchy. Unhooking the property appears to have no ill-effect.
R=sky@chromium.org
http://crbug.com/308843
Review URL: https://codereview.chromium.org/184903003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254642 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/accelerators')
-rw-r--r-- | ash/accelerators/accelerator_controller.cc | 4 | ||||
-rw-r--r-- | ash/accelerators/accelerator_controller_unittest.cc | 2 | ||||
-rw-r--r-- | ash/accelerators/key_hold_detector.cc | 2 | ||||
-rw-r--r-- | ash/accelerators/nested_dispatcher_controller_unittest.cc | 7 |
4 files changed, 7 insertions, 8 deletions
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc index cae18ff..e7b4251 100644 --- a/ash/accelerators/accelerator_controller.cc +++ b/ash/accelerators/accelerator_controller.cc @@ -560,7 +560,7 @@ bool HandleToggleFullscreen(ui::KeyboardCode key_code) { } bool HandleToggleRootWindowFullScreen() { - Shell::GetPrimaryRootWindow()->GetDispatcher()->host()->ToggleFullScreen(); + Shell::GetPrimaryRootWindow()->GetHost()->ToggleFullScreen(); return true; } @@ -703,7 +703,7 @@ bool HandlePrintLayerHierarchy() { for (size_t i = 0; i < root_windows.size(); ++i) { ui::PrintLayerHierarchy( root_windows[i]->layer(), - root_windows[i]->GetDispatcher()->GetLastMouseLocationInRoot()); + root_windows[i]->GetHost()->dispatcher()->GetLastMouseLocationInRoot()); } return true; } diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc index 06ce213..77bbe6f 100644 --- a/ash/accelerators/accelerator_controller_unittest.cc +++ b/ash/accelerators/accelerator_controller_unittest.cc @@ -636,7 +636,7 @@ TEST_F(AcceleratorControllerTest, MAYBE_ProcessOnce) { // The accelerator is processed only once. aura::WindowEventDispatcher* dispatcher = - Shell::GetPrimaryRootWindow()->GetDispatcher(); + Shell::GetPrimaryRootWindow()->GetHost()->dispatcher(); #if defined(OS_WIN) MSG msg1 = { NULL, WM_KEYDOWN, ui::VKEY_A, 0 }; ui::TranslatedKeyEvent key_event1(msg1, false); diff --git a/ash/accelerators/key_hold_detector.cc b/ash/accelerators/key_hold_detector.cc index 95ded1a..0908c2c 100644 --- a/ash/accelerators/key_hold_detector.cc +++ b/ash/accelerators/key_hold_detector.cc @@ -27,7 +27,7 @@ void DispatchPressedEvent(XEvent native_event, ui::KeyEvent event(&native_event, false); event.set_flags(event.flags() | ui::EF_IS_SYNTHESIZED); ui::EventDispatchDetails result ALLOW_UNUSED = - target->GetDispatcher()->OnEventFromSource(&event); + target->GetHost()->dispatcher()->OnEventFromSource(&event); } void PostPressedEvent(ui::KeyEvent* event) { diff --git a/ash/accelerators/nested_dispatcher_controller_unittest.cc b/ash/accelerators/nested_dispatcher_controller_unittest.cc index 67f528b..47dcce6b 100644 --- a/ash/accelerators/nested_dispatcher_controller_unittest.cc +++ b/ash/accelerators/nested_dispatcher_controller_unittest.cc @@ -84,11 +84,10 @@ void DispatchKeyReleaseA() { #elif defined(USE_X11) ui::ScopedXI2Event native_event; native_event.InitKeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_A, 0); - aura::WindowEventDispatcher* dispatcher = - ash::Shell::GetPrimaryRootWindow()->GetDispatcher(); - dispatcher->host()->PostNativeEvent(native_event); + aura::WindowTreeHost* host = ash::Shell::GetPrimaryRootWindow()->GetHost(); + host->PostNativeEvent(native_event); native_event.InitKeyEvent(ui::ET_KEY_RELEASED, ui::VKEY_A, 0); - dispatcher->host()->PostNativeEvent(native_event); + host->PostNativeEvent(native_event); #endif // Make sure the inner message-loop terminates after dispatching the events. base::MessageLoop::current()->PostTask(FROM_HERE, |