| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/shell.h" | 5 #include "ash/shell.h" |
| 6 #include "ash/shell_factory.h" | 6 #include "ash/shell_factory.h" |
| 7 #include "ash/wm/coordinate_conversion.h" | 7 #include "ash/wm/aura/wm_window_aura.h" |
| 8 #include "ash/wm/common/root_window_finder.h" |
| 8 #include "ash/wm/window_properties.h" | 9 #include "ash/wm/window_properties.h" |
| 9 #include "ui/aura/client/capture_client.h" | 10 #include "ui/aura/client/capture_client.h" |
| 10 #include "ui/aura/client/screen_position_client.h" | 11 #include "ui/aura/client/screen_position_client.h" |
| 11 #include "ui/aura/env.h" | 12 #include "ui/aura/env.h" |
| 12 #include "ui/aura/test/ui_controls_factory_aura.h" | 13 #include "ui/aura/test/ui_controls_factory_aura.h" |
| 13 #include "ui/aura/window_property.h" | 14 #include "ui/aura/window_property.h" |
| 14 #include "ui/aura/window_tree_host.h" | 15 #include "ui/aura/window_tree_host.h" |
| 15 #include "ui/base/test/ui_controls.h" | 16 #include "ui/base/test/ui_controls.h" |
| 16 #include "ui/base/test/ui_controls_aura.h" | 17 #include "ui/base/test/ui_controls_aura.h" |
| 17 #include "ui/gfx/screen.h" | 18 #include "ui/gfx/screen.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 38 aura::test::CreateUIControlsAura(root_window->GetHost()); | 39 aura::test::CreateUIControlsAura(root_window->GetHost()); |
| 39 // Pass the ownership to the |root_window|. | 40 // Pass the ownership to the |root_window|. |
| 40 root_window->SetProperty(kUIControlsKey, native_ui_control); | 41 root_window->SetProperty(kUIControlsKey, native_ui_control); |
| 41 } | 42 } |
| 42 return native_ui_control; | 43 return native_ui_control; |
| 43 } | 44 } |
| 44 | 45 |
| 45 // Returns the UIControls object for the RootWindow at |point_in_screen|. | 46 // Returns the UIControls object for the RootWindow at |point_in_screen|. |
| 46 UIControlsAura* GetUIControlsAt(const gfx::Point& point_in_screen) { | 47 UIControlsAura* GetUIControlsAt(const gfx::Point& point_in_screen) { |
| 47 // TODO(mazda): Support the case passive grab is taken. | 48 // TODO(mazda): Support the case passive grab is taken. |
| 48 return GetUIControlsForRootWindow(ash::wm::GetRootWindowAt(point_in_screen)); | 49 return GetUIControlsForRootWindow(wm::WmWindowAura::GetAuraWindow( |
| 50 ash::wm::GetRootWindowAt(point_in_screen))); |
| 49 } | 51 } |
| 50 | 52 |
| 51 } // namespace | 53 } // namespace |
| 52 | 54 |
| 53 class UIControlsAsh : public UIControlsAura { | 55 class UIControlsAsh : public UIControlsAura { |
| 54 public: | 56 public: |
| 55 UIControlsAsh() { | 57 UIControlsAsh() { |
| 56 } | 58 } |
| 57 ~UIControlsAsh() override {} | 59 ~UIControlsAsh() override {} |
| 58 | 60 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 private: | 130 private: |
| 129 DISALLOW_COPY_AND_ASSIGN(UIControlsAsh); | 131 DISALLOW_COPY_AND_ASSIGN(UIControlsAsh); |
| 130 }; | 132 }; |
| 131 | 133 |
| 132 ui_controls::UIControlsAura* CreateAshUIControls() { | 134 ui_controls::UIControlsAura* CreateAshUIControls() { |
| 133 return new ash::test::UIControlsAsh(); | 135 return new ash::test::UIControlsAsh(); |
| 134 } | 136 } |
| 135 | 137 |
| 136 } // namespace test | 138 } // namespace test |
| 137 } // namespace ash | 139 } // namespace ash |
| OLD | NEW |