mirror_window_test_api.cc revision 7dbb3d5cf0c15f500944d211057644d6a2f37371
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.
4
5#include "ash/test/mirror_window_test_api.h"
6
7#include "ash/display/display_controller.h"
8#include "ash/display/mirror_window_controller.h"
9#include "ash/shell.h"
10#include "ui/aura/root_window_transformer.h"
11#include "ui/gfx/point.h"
12
13namespace ash {
14namespace test {
15
16const aura::RootWindow* MirrorWindowTestApi::GetRootWindow() const {
17  return Shell::GetInstance()->display_controller()->
18      mirror_window_controller()->root_window_.get();
19}
20
21int MirrorWindowTestApi::GetCurrentCursorType() const {
22  return Shell::GetInstance()->display_controller()->
23      mirror_window_controller()->current_cursor_type_;
24}
25
26const gfx::Point& MirrorWindowTestApi::GetCursorHotPoint() const {
27  return Shell::GetInstance()->display_controller()->
28      mirror_window_controller()->hot_point_;
29}
30
31const aura::Window* MirrorWindowTestApi::GetCursorWindow() const {
32  return Shell::GetInstance()->display_controller()->
33      mirror_window_controller()->cursor_window_;
34}
35
36scoped_ptr<aura::RootWindowTransformer>
37MirrorWindowTestApi::CreateCurrentRootWindowTransformer() const {
38  return Shell::GetInstance()->display_controller()->
39      mirror_window_controller()->CreateRootWindowTransformer();
40}
41
42}  // namespace test
43}  // namespace ash
44