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

Unified Diff: ui/ozone/public/ozone_platform.cc

Issue 2629983002: Fix the MessageLoop type in case more than one ozone platform is built (Closed)
Patch Set: added a comment explain the static method 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
« ui/ozone/public/ozone_platform.h ('K') | « ui/ozone/public/ozone_platform.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/public/ozone_platform.cc
diff --git a/ui/ozone/public/ozone_platform.cc b/ui/ozone/public/ozone_platform.cc
index 6f25a1b12ead6e06b2230a137bee70503b79d28c..c04cf2f5f4fc39c5a51375e28230a70cc52856de 100644
--- a/ui/ozone/public/ozone_platform.cc
+++ b/ui/ozone/public/ozone_platform.cc
@@ -104,4 +104,12 @@ IPC::MessageFilter* OzonePlatform::GetGpuMessageFilter() {
void OzonePlatform::AddInterfaces(
service_manager::InterfaceRegistry* registry) {}
+base::MessageLoop::Type OzonePlatform::GetMessageLoopType() {
+ // If we are be running Ozone X11 we need a UI loop to grab Expose events.
+ // See GLSurfaceGLX and https://crbug.com/326995.
+ return (!strcmp(GetOzonePlatformName(), "x11"))
spang 2017/01/19 16:31:55 Don't use the platform name. Use a virtual functio
kylechar 2017/01/19 16:59:50 Right, that's a better idea. We can't run OzonePla
tonikitoo 2017/02/07 16:18:37 Done.
+ ? base::MessageLoop::TYPE_UI
+ : base::MessageLoop::TYPE_DEFAULT;
+}
+
} // namespace ui
« ui/ozone/public/ozone_platform.h ('K') | « ui/ozone/public/ozone_platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698