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