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

Unified Diff: components/view_manager/native_viewport/platform_viewport_x11.cc

Issue 1149083010: Mandoline: Remove native_viewport.mojom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More cleanup Created 5 years, 6 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: components/view_manager/native_viewport/platform_viewport_x11.cc
diff --git a/components/view_manager/native_viewport/platform_viewport_x11.cc b/components/view_manager/native_viewport/platform_viewport_x11.cc
index d0f6976700b6dc6100746135261c4646eec05033..29a3d55a8f7b02415f94b4a34c350e16a683a3fd 100644
--- a/components/view_manager/native_viewport/platform_viewport_x11.cc
+++ b/components/view_manager/native_viewport/platform_viewport_x11.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
+#include "components/view_manager/public/interfaces/view_manager.mojom.h"
#include "mojo/converters/geometry/geometry_type_converters.h"
#include "mojo/converters/input_events/input_events_type_converters.h"
#include "mojo/converters/input_events/mojo_extended_key_event_data.h"
@@ -69,8 +70,9 @@ class PlatformViewportX11 : public PlatformViewport,
// ui::PlatformWindowDelegate:
void OnBoundsChanged(const gfx::Rect& new_bounds) override {
- metrics_->size = mojo::Size::From(new_bounds.size());
- delegate_->OnMetricsChanged(metrics_.Clone());
+ // TODO(fsamuel): Use the real device_scale_factor.
+ delegate_->OnMetricsChanged(new_bounds.size(),
+ 1.f /* device_scale_factor */);
}
void OnDamageRect(const gfx::Rect& damaged_region) override {}

Powered by Google App Engine
This is Rietveld 408576698