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

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

Issue 12263050: Rework ash::CursorManager into a corewm object, to share code with desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: General patch cleanup. Created 7 years, 10 months 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/wm/cursor_manager.h" 7 #include "ash/shell.h"
8 #include "ash/test/shell_test_api.h"
9 #include "ash/wm/ash_cursor_platform_delegate.h"
8 #include "ash/wm/image_cursors.h" 10 #include "ash/wm/image_cursors.h"
11 #include "ui/views/corewm/cursor_manager.h"
9 12
10 namespace ash { 13 namespace ash {
11 namespace test { 14 namespace test {
12 15
13 CursorManagerTestApi::CursorManagerTestApi(CursorManager* cursor_manager) 16 CursorManagerTestApi::CursorManagerTestApi(
17 views::corewm::CursorManager* cursor_manager)
14 : cursor_manager_(cursor_manager) { 18 : cursor_manager_(cursor_manager) {
15 } 19 }
16 20
17 CursorManagerTestApi::~CursorManagerTestApi() { 21 CursorManagerTestApi::~CursorManagerTestApi() {
18 } 22 }
19 23
20 gfx::NativeCursor CursorManagerTestApi::GetCurrentCursor() const { 24 gfx::NativeCursor CursorManagerTestApi::GetCurrentCursor() const {
21 return cursor_manager_->GetCurrentCursor(); 25 return static_cast<views::corewm::CursorManagerDelegate*>(cursor_manager_)->
26 GetCurrentCursor();
22 } 27 }
23 28
24 float CursorManagerTestApi::GetDeviceScaleFactor() const { 29 float CursorManagerTestApi::GetDeviceScaleFactor() const {
25 return cursor_manager_->image_cursors_->GetDeviceScaleFactor(); 30 return ShellTestApi(Shell::GetInstance()).ash_cursor_platform_delegate()->
31 image_cursors_->GetDeviceScaleFactor();
26 } 32 }
27 33
28 } // namespace test 34 } // namespace test
29 } // namespace ash 35 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698