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

Unified Diff: components/mus/ws/test_utils.cc

Issue 2021483002: mus: Remove ViewportMetrics from mojom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 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 | « components/mus/ws/platform_display_delegate.h ('k') | components/mus/ws/window_server.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/test_utils.cc
diff --git a/components/mus/ws/test_utils.cc b/components/mus/ws/test_utils.cc
index 7706e307fa07939b9481f462a95dc7fb12a137b5..9a11d976f360283992c52407ad2477dfd1099544 100644
--- a/components/mus/ws/test_utils.cc
+++ b/components/mus/ws/test_utils.cc
@@ -26,8 +26,8 @@ class TestPlatformDisplay : public PlatformDisplay {
public:
explicit TestPlatformDisplay(int32_t* cursor_id_storage)
: cursor_id_storage_(cursor_id_storage) {
- display_metrics_.size_in_pixels = mojo::Size::From(gfx::Size(400, 300));
- display_metrics_.device_pixel_ratio = 1.f;
+ display_metrics_.size_in_pixels = gfx::Size(400, 300);
+ display_metrics_.device_scale_factor = 1.f;
}
~TestPlatformDisplay() override {}
@@ -36,8 +36,7 @@ class TestPlatformDisplay : public PlatformDisplay {
// It is necessary to tell the delegate about the ViewportMetrics to make
// sure that the DisplayBinding is correctly initialized (and a root-window
// is created).
- delegate->OnViewportMetricsChanged(mojom::ViewportMetrics(),
- display_metrics_);
+ delegate->OnViewportMetricsChanged(ViewportMetrics(), display_metrics_);
}
void SchedulePaint(const ServerWindow* window,
const gfx::Rect& bounds) override {}
@@ -47,8 +46,8 @@ class TestPlatformDisplay : public PlatformDisplay {
void ReleaseCapture() override {}
void SetCursorById(int32_t cursor) override { *cursor_id_storage_ = cursor; }
mojom::Rotation GetRotation() override { return mojom::Rotation::VALUE_0; }
- const mojom::ViewportMetrics& GetViewportMetrics() override {
- return display_metrics_;
+ float GetDeviceScaleFactor() override {
+ return display_metrics_.device_scale_factor;
}
void UpdateTextInputState(const ui::TextInputState& state) override {}
void SetImeVisibility(bool visible) override {}
@@ -57,7 +56,7 @@ class TestPlatformDisplay : public PlatformDisplay {
std::unique_ptr<cc::CopyOutputRequest> output_request) override {}
private:
- mojom::ViewportMetrics display_metrics_;
+ ViewportMetrics display_metrics_;
int32_t* cursor_id_storage_;
« no previous file with comments | « components/mus/ws/platform_display_delegate.h ('k') | components/mus/ws/window_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698