1 // Copyright (c) 2012 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/cursor_manager_test_api.h"
8 #include "ash/test/shell_test_api.h"
9 #include "ash/wm/ash_native_cursor_manager.h"
10 #include "ash/wm/image_cursors.h"
11 #include "ui/gfx/display.h"
12 #include "ui/views/corewm/cursor_manager.h"
17 CursorManagerTestApi::CursorManagerTestApi(
18 views::corewm::CursorManager* cursor_manager)
19 : cursor_manager_(cursor_manager) {
22 CursorManagerTestApi::~CursorManagerTestApi() {
25 float CursorManagerTestApi::GetCurrentScale() const {
26 return static_cast<views::corewm::NativeCursorManagerDelegate*>(
27 cursor_manager_)->GetCurrentScale();
30 ui::CursorSetType CursorManagerTestApi::GetCurrentCursorSet() const {
31 return static_cast<views::corewm::NativeCursorManagerDelegate*>(
32 cursor_manager_)->GetCurrentCursorSet();
35 gfx::NativeCursor CursorManagerTestApi::GetCurrentCursor() const {
36 return static_cast<views::corewm::NativeCursorManagerDelegate*>(
37 cursor_manager_)->GetCurrentCursor();
40 gfx::Display CursorManagerTestApi::GetDisplay() const {
41 return ShellTestApi(Shell::GetInstance()).ash_native_cursor_manager()->
42 image_cursors_->GetDisplay();