Index: components/mus/ws/test_change_tracker.cc |
diff --git a/components/mus/ws/test_change_tracker.cc b/components/mus/ws/test_change_tracker.cc |
index 953d66a062fa7ed80ed941adb6c126d810054e4c..5779d65a8052155938998c28d720e841e5c164c1 100644 |
--- a/components/mus/ws/test_change_tracker.cc |
+++ b/components/mus/ws/test_change_tracker.cc |
@@ -25,11 +25,6 @@ std::string WindowIdToString(Id id) { |
namespace { |
-std::string RectToString(const mojo::Rect& rect) { |
- return base::StringPrintf("%d,%d %dx%d", rect.x, rect.y, rect.width, |
- rect.height); |
-} |
- |
std::string DirectionToString(mojom::OrderDirection direction) { |
return direction == mojom::OrderDirection::ABOVE ? "above" : "below"; |
} |
@@ -69,8 +64,7 @@ std::string ChangeToDescription(const Change& change, |
return base::StringPrintf( |
"BoundsChanged window=%s old_bounds=%s new_bounds=%s", |
WindowIdToString(change.window_id).c_str(), |
- RectToString(change.bounds).c_str(), |
- RectToString(change.bounds2).c_str()); |
+ change.bounds.ToString().c_str(), change.bounds2.ToString().c_str()); |
case CHANGE_TYPE_NODE_HIERARCHY_CHANGED: |
return base::StringPrintf( |
@@ -256,19 +250,13 @@ void TestChangeTracker::OnEmbeddedAppDisconnected(Id window_id) { |
} |
void TestChangeTracker::OnWindowBoundsChanged(Id window_id, |
- mojo::RectPtr old_bounds, |
- mojo::RectPtr new_bounds) { |
+ const gfx::Rect& old_bounds, |
+ const gfx::Rect& new_bounds) { |
Change change; |
change.type = CHANGE_TYPE_NODE_BOUNDS_CHANGED; |
change.window_id = window_id; |
- change.bounds.x = old_bounds->x; |
- change.bounds.y = old_bounds->y; |
- change.bounds.width = old_bounds->width; |
- change.bounds.height = old_bounds->height; |
- change.bounds2.x = new_bounds->x; |
- change.bounds2.y = new_bounds->y; |
- change.bounds2.width = new_bounds->width; |
- change.bounds2.height = new_bounds->height; |
+ change.bounds = old_bounds; |
+ change.bounds2 = new_bounds; |
AddChange(change); |
} |