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

Unified Diff: media/ozone/media_ozone_platform.h

Issue 269673005: media: Add MediaOzonePlatform support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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: media/ozone/media_ozone_platform.h
diff --git a/media/ozone/media_ozone_platform.h b/media/ozone/media_ozone_platform.h
new file mode 100644
index 0000000000000000000000000000000000000000..dd537838e7db15c54badd831cdcc51299b7c57a8
--- /dev/null
+++ b/media/ozone/media_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_MEDIA_OZONE_PLATFORM_H_
+#define MEDIA_OZONE_MEDIA_OZONE_PLATFORM_H_
+
+#include "base/callback.h"
+#include "media/base/media_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 MEDIA_EXPORT MediaOzonePlatform {
+ public:
+ MediaOzonePlatform();
+ virtual ~MediaOzonePlatform();
+
+ // Besides get the global instance, initializes the subsystems/resources
+ // necessary for media also
xhwang 2014/06/09 23:53:34 nit: period at end of sentence.
vignatti (out of this project) 2014/06/10 14:50:29 Done.
+ static MediaOzonePlatform* 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
+ // MediaOzonePlatform.
+ virtual VideoDecodeAccelerator* CreateVideoDecodeAccelerator(
+ const base::Callback<bool(void)>& make_context_current);
+
+ private:
+ static void CreateInstance();
+
+ static MediaOzonePlatform* instance_;
+
+ DISALLOW_COPY_AND_ASSIGN(MediaOzonePlatform);
+};
+
+} // namespace media
+
+#endif // MEDIA_OZONE_MEDIA_OZONE_PLATFORM_H_

Powered by Google App Engine
This is Rietveld 408576698