| 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/wm/root_window_finder.h" | 6 #include "ash/wm/root_window_finder.h" |
| 7 #include "ash/wm/window_properties.h" | 7 #include "ash/wm/window_properties.h" |
| 8 #include "ui/aura/client/capture_client.h" | 8 #include "ui/aura/client/capture_client.h" |
| 9 #include "ui/aura/client/screen_position_client.h" | 9 #include "ui/aura/client/screen_position_client.h" |
| 10 #include "ui/aura/env.h" | 10 #include "ui/aura/env.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 return ui_controls && | 108 return ui_controls && |
| 109 ui_controls->SendMouseEventsNotifyWhenDone(type, state, closure); | 109 ui_controls->SendMouseEventsNotifyWhenDone(type, state, closure); |
| 110 } | 110 } |
| 111 | 111 |
| 112 bool SendMouseClick(MouseButton type) override { | 112 bool SendMouseClick(MouseButton type) override { |
| 113 gfx::Point p(display::Screen::GetScreen()->GetCursorScreenPoint()); | 113 gfx::Point p(display::Screen::GetScreen()->GetCursorScreenPoint()); |
| 114 UIControlsAura* ui_controls = GetUIControlsAt(p); | 114 UIControlsAura* ui_controls = GetUIControlsAt(p); |
| 115 return ui_controls && ui_controls->SendMouseClick(type); | 115 return ui_controls && ui_controls->SendMouseClick(type); |
| 116 } | 116 } |
| 117 | 117 |
| 118 bool SendTouchEvents(int action, int num, int x, int y) override { |
| 119 NOTIMPLEMENTED(); |
| 120 return false; |
| 121 } |
| 122 |
| 118 void RunClosureAfterAllPendingUIEvents( | 123 void RunClosureAfterAllPendingUIEvents( |
| 119 const base::Closure& closure) override { | 124 const base::Closure& closure) override { |
| 120 UIControlsAura* ui_controls = | 125 UIControlsAura* ui_controls = |
| 121 GetUIControlsForRootWindow(ash::Shell::GetRootWindowForNewWindows()); | 126 GetUIControlsForRootWindow(ash::Shell::GetRootWindowForNewWindows()); |
| 122 if (ui_controls) | 127 if (ui_controls) |
| 123 ui_controls->RunClosureAfterAllPendingUIEvents(closure); | 128 ui_controls->RunClosureAfterAllPendingUIEvents(closure); |
| 124 } | 129 } |
| 125 | 130 |
| 126 private: | 131 private: |
| 127 DISALLOW_COPY_AND_ASSIGN(UIControlsAsh); | 132 DISALLOW_COPY_AND_ASSIGN(UIControlsAsh); |
| 128 }; | 133 }; |
| 129 | 134 |
| 130 ui_controls::UIControlsAura* CreateAshUIControls() { | 135 ui_controls::UIControlsAura* CreateAshUIControls() { |
| 131 return new ash::test::UIControlsAsh(); | 136 return new ash::test::UIControlsAsh(); |
| 132 } | 137 } |
| 133 | 138 |
| 134 } // namespace test | 139 } // namespace test |
| 135 } // namespace ash | 140 } // namespace ash |
| OLD | NEW |