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

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

Issue 2629983002: Fix the MessageLoop type in case more than one ozone platform is built (Closed)
Patch Set: addressed sadrul's remarks. Created 3 years, 10 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 | « ui/ozone/platform/x11/ozone_platform_x11.cc ('k') | ui/ozone/public/ozone_platform.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/public/ozone_platform.h
diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h
index 236924f01591b3a53d0c52d6959e7854c9f8483f..2301fe624ac7514094a5a0b8bcbec0a372070b60 100644
--- a/ui/ozone/public/ozone_platform.h
+++ b/ui/ozone/public/ozone_platform.h
@@ -8,6 +8,7 @@
#include <memory>
#include "base/macros.h"
+#include "base/message_loop/message_loop.h"
#include "ui/ozone/ozone_export.h"
namespace display {
@@ -71,6 +72,11 @@ class OZONE_EXPORT OzonePlatform {
bool single_process = false;
};
+ // Creates the OzonePlatform instance without doing any initialization.
+ // This is useful in order call virtual methods that depend on the ozone
+ // platform selected at runtime, e.g. ::GetMessageLoopTypeForGpu,
Ken Russell (switch to Gerrit) 2017/02/08 04:57:45 Document that this is idempotent, and has no effec
tonikitoo 2017/02/08 06:42:08 Done.
+ static void CreateInstance();
+
// Initializes the subsystems/resources necessary for the UI process (e.g.
// events, etc.)
// TODO(rjkroege): Remove deprecated entry point (http://crbug.com/620934)
@@ -108,6 +114,10 @@ class OZONE_EXPORT OzonePlatform {
virtual std::unique_ptr<display::NativeDisplayDelegate>
CreateNativeDisplayDelegate() = 0;
+ // Returns the message loop type required for OzonePlatform instance that
+ // will be initialized for the GPU process.
+ virtual base::MessageLoop::Type GetMessageLoopTypeForGpu();
+
// Ozone platform implementations may also choose to expose mojo interfaces to
// internal functionality. Embedders wishing to take advantage of ozone mojo
// implementations must invoke AddInterfaces with a valid
@@ -124,8 +134,6 @@ class OZONE_EXPORT OzonePlatform {
virtual void InitializeUI(const InitParams& args);
virtual void InitializeGPU(const InitParams& args);
- static void CreateInstance();
-
static OzonePlatform* instance_;
DISALLOW_COPY_AND_ASSIGN(OzonePlatform);
« no previous file with comments | « ui/ozone/platform/x11/ozone_platform_x11.cc ('k') | ui/ozone/public/ozone_platform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698