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

Unified Diff: services/ui/ws/test_change_tracker.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_change_tracker.h ('k') | services/ui/ws/test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/test_change_tracker.cc
diff --git a/services/ui/ws/test_change_tracker.cc b/services/ui/ws/test_change_tracker.cc
index b27d565518cad46794525a5fda23edc786b63595..104cc614fc8750c644defe6a0966aab758d9b7b5 100644
--- a/services/ui/ws/test_change_tracker.cc
+++ b/services/ui/ws/test_change_tracker.cc
@@ -10,6 +10,7 @@
#include "base/strings/stringprintf.h"
#include "mojo/public/cpp/bindings/map.h"
#include "services/ui/common/util.h"
+#include "ui/base/cursor/cursor.h"
namespace ui {
@@ -131,9 +132,9 @@ std::string ChangeToDescription(const Change& change,
WindowIdToString(change.window_id).c_str());
case CHANGE_TYPE_CURSOR_CHANGED:
- return base::StringPrintf("CursorChanged id=%s cursor_id=%d",
+ return base::StringPrintf("CursorChanged id=%s cursor_type=%d",
WindowIdToString(change.window_id).c_str(),
- change.cursor_id);
+ static_cast<int>(change.cursor_type));
case CHANGE_TYPE_ON_CHANGE_COMPLETED:
return base::StringPrintf("ChangeCompleted id=%d sucess=%s",
change.change_id,
@@ -230,7 +231,7 @@ Change::Change()
direction(mojom::OrderDirection::ABOVE),
bool_value(false),
float_value(0.f),
- cursor_id(0),
+ cursor_type(ui::CursorType::kNull),
change_id(0u) {}
Change::Change(const Change& other) = default;
@@ -420,13 +421,12 @@ void TestChangeTracker::OnWindowFocused(Id window_id) {
AddChange(change);
}
-void TestChangeTracker::OnWindowPredefinedCursorChanged(
- Id window_id,
- mojom::CursorType cursor_id) {
+void TestChangeTracker::OnWindowCursorChanged(Id window_id,
+ const ui::CursorData& cursor) {
Change change;
change.type = CHANGE_TYPE_CURSOR_CHANGED;
change.window_id = window_id;
- change.cursor_id = static_cast<int32_t>(cursor_id);
+ change.cursor_type = cursor.cursor_type();
AddChange(change);
}
« no previous file with comments | « services/ui/ws/test_change_tracker.h ('k') | services/ui/ws/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698