| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/test/mirror_window_test_api.h" | 5 #include "ash/test/mirror_window_test_api.h" |
| 6 | 6 |
| 7 #include "ash/display/cursor_window_controller.h" | 7 #include "ash/display/cursor_window_controller.h" |
| 8 #include "ash/display/display_controller.h" | 8 #include "ash/display/display_controller.h" |
| 9 #include "ash/display/mirror_window_controller.h" | 9 #include "ash/display/mirror_window_controller.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 11 #include "ui/aura/root_window_transformer.h" | 11 #include "ui/aura/root_window_transformer.h" |
| 12 #include "ui/gfx/point.h" | 12 #include "ui/gfx/point.h" |
| 13 | 13 |
| 14 namespace ash { | 14 namespace ash { |
| 15 namespace test { | 15 namespace test { |
| 16 | 16 |
| 17 const aura::WindowEventDispatcher* MirrorWindowTestApi::GetDispatcher() const { | 17 const aura::WindowTreeHost* MirrorWindowTestApi::GetHost() const { |
| 18 aura::WindowTreeHost* host = Shell::GetInstance()->display_controller()-> | 18 return Shell::GetInstance()->display_controller()-> |
| 19 mirror_window_controller()->host_.get(); | 19 mirror_window_controller()->host_.get(); |
| 20 return host ? host->dispatcher() : NULL; | |
| 21 } | 20 } |
| 22 | 21 |
| 23 int MirrorWindowTestApi::GetCurrentCursorType() const { | 22 int MirrorWindowTestApi::GetCurrentCursorType() const { |
| 24 return Shell::GetInstance()->display_controller()-> | 23 return Shell::GetInstance()->display_controller()-> |
| 25 cursor_window_controller()->cursor_type_; | 24 cursor_window_controller()->cursor_type_; |
| 26 } | 25 } |
| 27 | 26 |
| 28 const gfx::Point& MirrorWindowTestApi::GetCursorHotPoint() const { | 27 const gfx::Point& MirrorWindowTestApi::GetCursorHotPoint() const { |
| 29 return Shell::GetInstance()->display_controller()-> | 28 return Shell::GetInstance()->display_controller()-> |
| 30 cursor_window_controller()->hot_point_; | 29 cursor_window_controller()->hot_point_; |
| 31 } | 30 } |
| 32 | 31 |
| 33 const aura::Window* MirrorWindowTestApi::GetCursorWindow() const { | 32 const aura::Window* MirrorWindowTestApi::GetCursorWindow() const { |
| 34 return Shell::GetInstance()->display_controller()-> | 33 return Shell::GetInstance()->display_controller()-> |
| 35 cursor_window_controller()->cursor_window_.get(); | 34 cursor_window_controller()->cursor_window_.get(); |
| 36 } | 35 } |
| 37 | 36 |
| 38 scoped_ptr<aura::RootWindowTransformer> | 37 scoped_ptr<aura::RootWindowTransformer> |
| 39 MirrorWindowTestApi::CreateCurrentRootWindowTransformer() const { | 38 MirrorWindowTestApi::CreateCurrentRootWindowTransformer() const { |
| 40 return Shell::GetInstance()->display_controller()-> | 39 return Shell::GetInstance()->display_controller()-> |
| 41 mirror_window_controller()->CreateRootWindowTransformer(); | 40 mirror_window_controller()->CreateRootWindowTransformer(); |
| 42 } | 41 } |
| 43 | 42 |
| 44 } // namespace test | 43 } // namespace test |
| 45 } // namespace ash | 44 } // namespace ash |
| OLD | NEW |