Index: media/ozone/ozone_platform.h |
diff --git a/media/ozone/ozone_platform.h b/media/ozone/ozone_platform.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2910f72864bb15abfa0f10c58bd9175a9fa9bf1e |
--- /dev/null |
+++ b/media/ozone/ozone_platform.h |
@@ -0,0 +1,47 @@ |
+// Copyright 2014 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 MEDIA_OZONE_OZONE_PLATFORM_H_ |
spang
2014/06/09 19:01:58
filename should match class name
And I think Ozon
vignatti (out of this project)
2014/06/09 20:30:27
Done.
|
+#define MEDIA_OZONE_OZONE_PLATFORM_H_ |
+ |
+#include "base/callback.h" |
+#include "ui/ozone/ozone_export.h" |
+ |
+namespace media { |
+ |
+class VideoDecodeAccelerator; |
+ |
+// Class for Ozone platform media implementations. Note that the base class for |
+// Ozone platform is at ui/ozone. |
+// |
+// Ozone platforms must override this class and implement the virtual |
+// GetFooFactoryOzone() methods to provide implementations of the |
+// various ozone interfaces. |
+class OZONE_EXPORT OzonePlatformMedia { |
spang
2014/06/09 19:01:58
wrong export, this is part of media.
vignatti (out of this project)
2014/06/09 20:30:27
Done.
|
+ public: |
+ OzonePlatformMedia(); |
+ virtual ~OzonePlatformMedia(); |
+ |
+ // Besides get the global instance, initializes the subsystems/resources |
+ // necessary for media also |
+ static OzonePlatformMedia* GetInstance(); |
+ |
+ // Factory getters to override in subclasses. The returned objects will be |
+ // injected into the appropriate layer at startup. Subclasses should not |
+ // inject these objects themselves. Ownership is retained by |
+ // OzonePlatformMedia. |
+ virtual VideoDecodeAccelerator* CreateVideoDecodeFactoryOzone( |
Ami GONE FROM CHROMIUM
2014/06/06 22:09:17
CreateVideoDecodeFactoryOzone is inappropriate con
vignatti (out of this project)
2014/06/09 20:30:27
Done.
|
+ const base::Callback<bool(void)>& make_context_current); |
+ |
+ private: |
+ static void CreateInstance(); |
+ |
+ static OzonePlatformMedia* instance_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(OzonePlatformMedia); |
+}; |
+ |
+} // namespace media |
+ |
+#endif // MEDIA_OZONE_OZONE_PLATFORM_H_ |