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

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

Issue 1171513002: Reland of Revert of ozone: Remove singleton pattern for SurfaceFactoryOzone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: ui/ozone/public/surface_factory_ozone.h
diff --git a/ui/ozone/public/surface_factory_ozone.h b/ui/ozone/public/surface_factory_ozone.h
index 3a509960976ba9f1881d07da205a382e3b708a8e..678976b904bc4f56b3e82ea8e1b125d60325efdf 100644
--- a/ui/ozone/public/surface_factory_ozone.h
+++ b/ui/ozone/public/surface_factory_ozone.h
@@ -8,16 +8,11 @@
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/native_library.h"
-#include "ui/gfx/geometry/point.h"
-#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/overlay_transform.h"
#include "ui/ozone/ozone_base_export.h"
-class SkBitmap;
-class SkCanvas;
-
namespace ui {
class NativePixmap;
@@ -78,12 +73,6 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone {
typedef base::Callback<void(GLGetProcAddressProc)>
SetGLGetProcAddressProcCallback;
- SurfaceFactoryOzone();
- virtual ~SurfaceFactoryOzone();
-
- // Returns the singleton instance.
- static SurfaceFactoryOzone* GetInstance();
-
// Returns native platform display handle. This is used to obtain the EGL
// display connection for the native display.
virtual intptr_t GetNativeDisplay();
@@ -159,8 +148,12 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone {
// such as MAP for zero copy or SCANOUT for display controller.
virtual bool CanCreateNativePixmap(BufferUsage usage);
+ protected:
+ SurfaceFactoryOzone();
+ virtual ~SurfaceFactoryOzone();
+
private:
- static SurfaceFactoryOzone* impl_; // not owned
+ DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone);
};
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698