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
3 // found in the LICENSE file.
5 #include "ash/test/mirror_window_test_api.h"
7 #include "ash/display/cursor_window_controller.h"
8 #include "ash/display/display_controller.h"
9 #include "ash/display/mirror_window_controller.h"
10 #include "ash/host/root_window_transformer.h"
11 #include "ash/shell.h"
12 #include "ui/gfx/geometry/point.h"
17 const aura::WindowTreeHost
* MirrorWindowTestApi::GetHost() const {
18 aura::Window
* window
= Shell::GetInstance()
19 ->display_controller()
20 ->mirror_window_controller()
22 return window
? window
->GetHost() : NULL
;
25 int MirrorWindowTestApi::GetCurrentCursorType() const {
26 return Shell::GetInstance()->display_controller()->
27 cursor_window_controller()->cursor_type_
;
30 const gfx::Point
& MirrorWindowTestApi::GetCursorHotPoint() const {
31 return Shell::GetInstance()->display_controller()->
32 cursor_window_controller()->hot_point_
;
35 const aura::Window
* MirrorWindowTestApi::GetCursorWindow() const {
36 return Shell::GetInstance()->display_controller()->
37 cursor_window_controller()->cursor_window_
.get();
40 scoped_ptr
<RootWindowTransformer
>
41 MirrorWindowTestApi::CreateCurrentRootWindowTransformer() const {
42 return Shell::GetInstance()->display_controller()->
43 mirror_window_controller()->CreateRootWindowTransformer();