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

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 moar sadrul/kylechar's feedback 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
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..4a027b2f51d4ce3b83f609fd177db862aeebb6b9 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 {
@@ -108,6 +109,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.
+ 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
@@ -118,14 +123,14 @@ class OZONE_EXPORT OzonePlatform {
// implementations to opt out of implementing any Mojo interfaces.
virtual void AddInterfaces(service_manager::InterfaceRegistry* registry);
+ static void CreateInstance();
kylechar 2017/02/07 17:41:47 Please put this with the static functions, above "
tonikitoo 2017/02/07 19:36:41 Done.
+
private:
virtual void InitializeUI() = 0;
virtual void InitializeGPU() = 0;
virtual void InitializeUI(const InitParams& args);
virtual void InitializeGPU(const InitParams& args);
- static void CreateInstance();
-
static OzonePlatform* instance_;
DISALLOW_COPY_AND_ASSIGN(OzonePlatform);

Powered by Google App Engine
This is Rietveld 408576698