mirror_window_test_api.cc revision 90dce4d38c5ff5333bea97d859d4e484e27edf0c
190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)// Copyright (c) 2013 The Chromium Authors. All rights reserved.
290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)// found in the LICENSE file.
490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "ash/test/mirror_window_test_api.h"
690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "ash/display/mirror_window_controller.h"
890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "ash/shell.h"
990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)#include "ui/gfx/point.h"
1090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
1190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)namespace ash {
1290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)namespace test {
1390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
1490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)const aura::RootWindow* MirrorWindowTestApi::GetRootWindow() const {
1590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)  return Shell::GetInstance()->mirror_window_controller()->root_window_.get();
1690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)}
1790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
1890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)int MirrorWindowTestApi::GetCurrentCursorType() const {
1990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)  return Shell::GetInstance()->mirror_window_controller()->current_cursor_type_;
2090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)}
2190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
2290dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)const gfx::Point& MirrorWindowTestApi::GetCursorHotPoint() const {
2390dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)  return Shell::GetInstance()->mirror_window_controller()->hot_point_;
2490dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)}
2590dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
2690dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)const aura::Window* MirrorWindowTestApi::GetCursorWindow() const {
2790dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)  return Shell::GetInstance()->mirror_window_controller()->cursor_window_;
2890dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)}
2990dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)
3090dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)}  // namespace test
3190dce4d38c5ff5333bea97d859d4e484e27edf0cTorne (Richard Coles)}  // namespace ash
32