Index: ui/ozone/public/native_pixmap_manager.h |
diff --git a/ui/ozone/public/native_pixmap_manager.h b/ui/ozone/public/native_pixmap_manager.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5ce4a0b6a1d29f452c729cae23204b522a5b6fe5 |
--- /dev/null |
+++ b/ui/ozone/public/native_pixmap_manager.h |
@@ -0,0 +1,57 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_OZONE_PUBLIC_NATIVE_PIXMAP_MANAGER_H_ |
+#define UI_OZONE_PUBLIC_NATIVE_PIXMAP_MANAGER_H_ |
+ |
+#include <vector> |
+ |
+#include "ui/ozone/ozone_export.h" |
+#include "ui/ozone/public/surface_factory_ozone.h" |
+ |
+namespace base { |
+ |
+struct FileDescriptor; |
+ |
+} // namespace base |
+ |
+namespace ui { |
+ |
+// The Ozone interface allows external implementations to hook into Chromium to |
+// provide the handle of a system specific surface implementation for Browser |
+// and Render process. |
reveman
2015/07/22 16:59:55
system specific surface implementation?
dshwang
2015/07/23 14:02:28
s/system specific surface implementation/native su
|
+class OZONE_EXPORT NativePixmapManager { |
+ public: |
+ static NativePixmapManager* GetInstance(); |
+ static void SetInstance(NativePixmapManager* instance); |
+ |
+ static scoped_ptr<NativePixmapManager> Create( |
+ const base::FileDescriptor& device_fd); |
+ |
+ virtual ~NativePixmapManager(); |
+ |
+ struct Configuration { |
+ SurfaceFactoryOzone::BufferFormat format; |
+ SurfaceFactoryOzone::BufferUsage usage; |
+ }; |
+ |
+ // Gets supported format/usage configurations. |
+ virtual std::vector<Configuration> GetSupportedNativePixmapConfigurations() |
+ const = 0; |
+ |
+ protected: |
+ NativePixmapManager(); |
+ |
+ virtual void Initialize(const base::FileDescriptor& device_fd) = 0; |
reveman
2015/07/22 16:59:55
do you really need this when you have the static f
dshwang
2015/07/23 14:02:28
It's needed for next CL. I move this to next CL.
|
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(NativePixmapManager); |
+}; |
+ |
+// Platforms which don't need to share native pixmap use this. |
+NativePixmapManager* CreateStubNativePixmapManager(); |
reveman
2015/07/22 16:59:55
Does this deserve it's own file? Who owns the poin
dshwang
2015/07/23 14:02:28
Make sense. I move it to ui/ozone/common/stub_nati
|
+ |
+} // namespace ui |
+ |
+#endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_MANAGER_H_ |