summaryrefslogtreecommitdiffstats
path: root/ash/test/ui_controls_factory_ash.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-25 19:22:45 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-25 19:22:45 +0000
commitbf9cdb36cc79becab099c9f37eb80284fb203f45 (patch)
tree4c9011f0aa08ac613027abd372cec3a3b613032b /ash/test/ui_controls_factory_ash.cc
parentfef72c1c9890633a237e06ccb0d0f4ce2ca6c9c1 (diff)
downloadchromium_src-bf9cdb36cc79becab099c9f37eb80284fb203f45.zip
chromium_src-bf9cdb36cc79becab099c9f37eb80284fb203f45.tar.gz
chromium_src-bf9cdb36cc79becab099c9f37eb80284fb203f45.tar.bz2
Make GetRootWindow() return a Window instead of a RootWindow.
Also adds a typedef from RootWindow to WindowEventDispatcher, the eventual name of this type. Adds a GetDispatcher() method that crawls up to the root Window and returns the WindowEventDispatcher. R=sky@chromium.org http://crbug.com/308843 Review URL: https://codereview.chromium.org/37733003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231077 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test/ui_controls_factory_ash.cc')
-rw-r--r--ash/test/ui_controls_factory_ash.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/ash/test/ui_controls_factory_ash.cc b/ash/test/ui_controls_factory_ash.cc
index 458a4cb..b8393e5 100644
--- a/ash/test/ui_controls_factory_ash.cc
+++ b/ash/test/ui_controls_factory_ash.cc
@@ -30,11 +30,12 @@ DEFINE_OWNED_WINDOW_PROPERTY_KEY(UIControlsAura, kUIControlsKey, NULL);
// Returns the UIControls object for RootWindow.
// kUIControlsKey is owned property and UIControls object
// will be deleted when the root window is deleted.
-UIControlsAura* GetUIControlsForRootWindow(aura::RootWindow* root_window) {
+UIControlsAura* GetUIControlsForRootWindow(aura::Window* root_window) {
UIControlsAura* native_ui_control =
root_window->GetProperty(kUIControlsKey);
if (!native_ui_control) {
- native_ui_control = aura::test::CreateUIControlsAura(root_window);
+ native_ui_control =
+ aura::test::CreateUIControlsAura(root_window->GetDispatcher());
// Pass the ownership to the |root_window|.
root_window->SetProperty(kUIControlsKey, native_ui_control);
}
@@ -47,7 +48,7 @@ UIControlsAura* GetUIControlsForRootWindow(aura::RootWindow* root_window) {
// the |point_in_screen|.
UIControlsAura* GetUIControlsAt(gfx::Point* point_in_screen) {
// TODO(mazda): Support the case passive grab is taken.
- aura::RootWindow* root = ash::wm::GetRootWindowAt(*point_in_screen);
+ aura::Window* root = ash::wm::GetRootWindowAt(*point_in_screen);
aura::client::ScreenPositionClient* screen_position_client =
aura::client::GetScreenPositionClient(root);
@@ -85,7 +86,7 @@ class UIControlsAsh : public UIControlsAura {
bool alt,
bool command,
const base::Closure& closure) OVERRIDE {
- aura::RootWindow* root =
+ aura::Window* root =
window ? window->GetRootWindow() : ash::Shell::GetTargetRootWindow();
UIControlsAura* ui_controls = GetUIControlsForRootWindow(root);
return ui_controls && ui_controls->SendKeyPressNotifyWhenDone(