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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: ash/test/cursor_manager_test_api.cc
diff --git a/ash/test/cursor_manager_test_api.cc b/ash/test/cursor_manager_test_api.cc
index bd24b0db57c06272580331a3b9ebe83db3e993f5..c09324256814569f9665f2f92e6ceaf39c5577ed 100644
--- a/ash/test/cursor_manager_test_api.cc
+++ b/ash/test/cursor_manager_test_api.cc
@@ -4,13 +4,17 @@
#include "ash/test/cursor_manager_test_api.h"
-#include "ash/wm/cursor_manager.h"
+#include "ash/shell.h"
+#include "ash/test/shell_test_api.h"
+#include "ash/wm/ash_cursor_platform_delegate.h"
#include "ash/wm/image_cursors.h"
+#include "ui/views/corewm/cursor_manager.h"
namespace ash {
namespace test {
-CursorManagerTestApi::CursorManagerTestApi(CursorManager* cursor_manager)
+CursorManagerTestApi::CursorManagerTestApi(
+ views::corewm::CursorManager* cursor_manager)
: cursor_manager_(cursor_manager) {
}
@@ -18,11 +22,13 @@ CursorManagerTestApi::~CursorManagerTestApi() {
}
gfx::NativeCursor CursorManagerTestApi::GetCurrentCursor() const {
- return cursor_manager_->GetCurrentCursor();
+ return static_cast<views::corewm::CursorManagerDelegate*>(cursor_manager_)->
+ GetCurrentCursor();
}
float CursorManagerTestApi::GetDeviceScaleFactor() const {
- return cursor_manager_->image_cursors_->GetDeviceScaleFactor();
+ return ShellTestApi(Shell::GetInstance()).ash_cursor_platform_delegate()->
+ image_cursors_->GetDeviceScaleFactor();
}
} // namespace test

Powered by Google App Engine
This is Rietveld 408576698