OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/test/cursor_manager_test_api.h" | 5 #include "ash/test/cursor_manager_test_api.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/shell_test_api.h" | 8 #include "ash/test/shell_test_api.h" |
9 #include "ash/wm/ash_native_cursor_manager.h" | 9 #include "ash/wm/ash_native_cursor_manager.h" |
10 #include "ash/wm/image_cursors.h" | 10 #include "ash/wm/image_cursors.h" |
11 #include "ui/gfx/display.h" | 11 #include "ui/gfx/display.h" |
12 #include "ui/wm/core/cursor_manager.h" | 12 #include "ui/wm/core/cursor_manager.h" |
13 | 13 |
14 namespace ash { | 14 namespace ash { |
15 namespace test { | 15 namespace test { |
16 | 16 |
17 CursorManagerTestApi::CursorManagerTestApi( | 17 CursorManagerTestApi::CursorManagerTestApi( |
18 wm::CursorManager* cursor_manager) | 18 wm::CursorManager* cursor_manager) |
19 : cursor_manager_(cursor_manager) { | 19 : cursor_manager_(cursor_manager) { |
20 } | 20 } |
21 | 21 |
22 CursorManagerTestApi::~CursorManagerTestApi() { | 22 CursorManagerTestApi::~CursorManagerTestApi() { |
23 } | 23 } |
24 | 24 |
25 // TODO(tdanderson): CursorManagerTestApi may no longer be needed. | 25 // TODO(tdanderson): CursorManagerTestApi may no longer be needed. |
| 26 float CursorManagerTestApi::GetCurrentScale() const { |
| 27 return cursor_manager_->GetScale(); |
| 28 } |
| 29 |
26 ui::CursorSetType CursorManagerTestApi::GetCurrentCursorSet() const { | 30 ui::CursorSetType CursorManagerTestApi::GetCurrentCursorSet() const { |
27 return cursor_manager_->GetCursorSet(); | 31 return cursor_manager_->GetCursorSet(); |
28 } | 32 } |
29 | 33 |
30 gfx::NativeCursor CursorManagerTestApi::GetCurrentCursor() const { | 34 gfx::NativeCursor CursorManagerTestApi::GetCurrentCursor() const { |
31 return cursor_manager_->GetCursor(); | 35 return cursor_manager_->GetCursor(); |
32 } | 36 } |
33 | 37 |
34 gfx::Display CursorManagerTestApi::GetDisplay() const { | 38 gfx::Display CursorManagerTestApi::GetDisplay() const { |
35 return ShellTestApi(Shell::GetInstance()).ash_native_cursor_manager()-> | 39 return ShellTestApi(Shell::GetInstance()).ash_native_cursor_manager()-> |
36 image_cursors_->GetDisplay(); | 40 image_cursors_->GetDisplay(); |
37 } | 41 } |
38 | 42 |
39 } // namespace test | 43 } // namespace test |
40 } // namespace ash | 44 } // namespace ash |
OLD | NEW |