Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: ash/test/cursor_manager_test_api.cc

Issue 92413002: Cursor state should be global for all CursorManagers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for review Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/views/corewm/cursor_manager.h" 12 #include "ui/views/corewm/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 views::corewm::CursorManager* cursor_manager) 18 views::corewm::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 should no longer be required
26 // once the refactoring of CursorManager is complete.
25 float CursorManagerTestApi::GetCurrentScale() const { 27 float CursorManagerTestApi::GetCurrentScale() const {
26 return static_cast<views::corewm::NativeCursorManagerDelegate*>( 28 return cursor_manager_->GetScale();
27 cursor_manager_)->GetCurrentScale();
28 } 29 }
29 30
30 ui::CursorSetType CursorManagerTestApi::GetCurrentCursorSet() const { 31 ui::CursorSetType CursorManagerTestApi::GetCurrentCursorSet() const {
31 return static_cast<views::corewm::NativeCursorManagerDelegate*>( 32 return cursor_manager_->GetCursorSet();
32 cursor_manager_)->GetCurrentCursorSet();
33 } 33 }
34 34
35 gfx::NativeCursor CursorManagerTestApi::GetCurrentCursor() const { 35 gfx::NativeCursor CursorManagerTestApi::GetCurrentCursor() const {
36 return static_cast<views::corewm::NativeCursorManagerDelegate*>( 36 return cursor_manager_->GetCursor();
37 cursor_manager_)->GetCurrentCursor();
38 } 37 }
39 38
40 gfx::Display CursorManagerTestApi::GetDisplay() const { 39 gfx::Display CursorManagerTestApi::GetDisplay() const {
41 return ShellTestApi(Shell::GetInstance()).ash_native_cursor_manager()-> 40 return ShellTestApi(Shell::GetInstance()).ash_native_cursor_manager()->
42 image_cursors_->GetDisplay(); 41 image_cursors_->GetDisplay();
43 } 42 }
44 43
45 } // namespace test 44 } // namespace test
46 } // namespace ash 45 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698