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

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

Issue 2610783003: mus: Make sure window parenting happens in the window server. (Closed)
Patch Set: . Created 3 years, 11 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/platform_display_default.h ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/platform_display_default.cc
diff --git a/services/ui/ws/platform_display_default.cc b/services/ui/ws/platform_display_default.cc
index 6a3a6e9dc9fb2d7e4cf40f969ea54d24801fecbe..1588b7d88be60a3a9a454bec9425afa8e12e2c48 100644
--- a/services/ui/ws/platform_display_default.cc
+++ b/services/ui/ws/platform_display_default.cc
@@ -36,7 +36,8 @@ PlatformDisplayDefault::PlatformDisplayDefault(
image_cursors_(new ImageCursors),
#endif
frame_generator_(new FrameGenerator(this, init_params.root_window)),
- metrics_(init_params.metrics) {
+ metrics_(init_params.metrics),
+ widget_(gfx::kNullAcceleratedWidget) {
frame_generator_->set_device_scale_factor(
init_params.metrics.device_scale_factor);
}
@@ -157,6 +158,10 @@ const display::ViewportMetrics& PlatformDisplayDefault::GetViewportMetrics()
return metrics_;
}
+gfx::AcceleratedWidget PlatformDisplayDefault::GetAcceleratedWidget() const {
+ return widget_;
+}
+
void PlatformDisplayDefault::UpdateEventRootLocation(ui::LocatedEvent* event) {
gfx::Point location = event->location();
location.Offset(metrics_.bounds.x(), metrics_.bounds.y());
@@ -238,6 +243,8 @@ void PlatformDisplayDefault::OnAcceleratedWidgetAvailable(
// This will get called after Init() is called, either synchronously as part
// of the Init() callstack or async after Init() has returned, depending on
// the platform.
+ DCHECK_EQ(gfx::kNullAcceleratedWidget, widget_);
+ widget_ = widget;
delegate_->OnAcceleratedWidgetAvailable();
frame_generator_->OnAcceleratedWidgetAvailable(widget);
}
« no previous file with comments | « services/ui/ws/platform_display_default.h ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698