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

Unified Diff: services/ui/ws/test_utils.cc

Issue 2830703003: [views-mus] Support custom cursors. (Closed)
Patch Set: fix cast_shell_linux Created 3 years, 8 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
« no previous file with comments | « services/ui/ws/test_utils.h ('k') | services/ui/ws/window_manager_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/test_utils.cc
diff --git a/services/ui/ws/test_utils.cc b/services/ui/ws/test_utils.cc
index fe0428c8b04d6deaee18b7777dcf80738aeabd7e..e926d36622634c4942a09b3ae67ba82450775e19 100644
--- a/services/ui/ws/test_utils.cc
+++ b/services/ui/ws/test_utils.cc
@@ -16,6 +16,7 @@
#include "services/ui/ws/window_manager_access_policy.h"
#include "services/ui/ws/window_manager_window_tree_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/base/cursor/cursor.h"
#include "ui/gfx/geometry/dip_util.h"
namespace ui {
@@ -28,7 +29,7 @@ namespace {
class TestPlatformDisplay : public PlatformDisplay {
public:
explicit TestPlatformDisplay(const display::ViewportMetrics& metrics,
- mojom::CursorType* cursor_storage)
+ ui::CursorData* cursor_storage)
: metrics_(metrics), cursor_storage_(cursor_storage) {}
~TestPlatformDisplay() override {}
@@ -40,7 +41,7 @@ class TestPlatformDisplay : public PlatformDisplay {
void SetTitle(const base::string16& title) override {}
void SetCapture() override {}
void ReleaseCapture() override {}
- void SetCursorById(mojom::CursorType cursor) override {
+ void SetCursor(const ui::CursorData& cursor) override {
*cursor_storage_ = cursor;
}
void UpdateTextInputState(const ui::TextInputState& state) override {}
@@ -56,7 +57,7 @@ class TestPlatformDisplay : public PlatformDisplay {
private:
display::ViewportMetrics metrics_;
- mojom::CursorType* cursor_storage_;
+ ui::CursorData* cursor_storage_;
DISALLOW_COPY_AND_ASSIGN(TestPlatformDisplay);
};
@@ -149,7 +150,7 @@ display::ScreenBase* TestScreenManager::GetScreen() {
// TestPlatformDisplayFactory -------------------------------------------------
TestPlatformDisplayFactory::TestPlatformDisplayFactory(
- mojom::CursorType* cursor_storage)
+ ui::CursorData* cursor_storage)
: cursor_storage_(cursor_storage) {}
TestPlatformDisplayFactory::~TestPlatformDisplayFactory() {}
@@ -423,10 +424,9 @@ void TestWindowTreeClient::OnWindowFocused(uint32_t focused_window_id) {
tracker_.OnWindowFocused(focused_window_id);
}
-void TestWindowTreeClient::OnWindowPredefinedCursorChanged(
- uint32_t window_id,
- mojom::CursorType cursor_id) {
- tracker_.OnWindowPredefinedCursorChanged(window_id, cursor_id);
+void TestWindowTreeClient::OnWindowCursorChanged(uint32_t window_id,
+ ui::CursorData cursor) {
+ tracker_.OnWindowCursorChanged(window_id, cursor);
}
void TestWindowTreeClient::OnWindowSurfaceChanged(
@@ -530,8 +530,7 @@ bool TestWindowServerDelegate::IsTestConfig() const {
// WindowServerTestHelper ---------------------------------------------------
WindowServerTestHelper::WindowServerTestHelper()
- : cursor_id_(mojom::CursorType::kNull),
- platform_display_factory_(&cursor_id_) {
+ : cursor_(ui::CursorType::kNull), platform_display_factory_(&cursor_) {
// Some tests create their own message loop, for example to add a task runner.
if (!base::MessageLoop::current())
message_loop_ = base::MakeUnique<base::MessageLoop>();
« no previous file with comments | « services/ui/ws/test_utils.h ('k') | services/ui/ws/window_manager_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698