cleanup: Use ExtensionRegistryObserver in Uber
[chromium-blink-merge.git] / media / ozone / media_ozone_platform.h
blobc59775dc32b2982cabbc63a42b1e31136b37b9f3
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_OZONE_MEDIA_OZONE_PLATFORM_H_
6 #define MEDIA_OZONE_MEDIA_OZONE_PLATFORM_H_
8 #include "base/callback.h"
9 #include "media/base/media_export.h"
11 namespace media {
13 class VideoDecodeAccelerator;
15 // Class for Ozone platform media implementations. Note that the base class for
16 // Ozone platform is at ui/ozone.
18 // Ozone platforms must override this class and implement the virtual
19 // GetFooFactoryOzone() methods to provide implementations of the
20 // various ozone interfaces.
21 class MEDIA_EXPORT MediaOzonePlatform {
22 public:
23 MediaOzonePlatform();
24 virtual ~MediaOzonePlatform();
26 // Besides get the global instance, initializes the subsystems/resources
27 // necessary for media also.
28 static MediaOzonePlatform* GetInstance();
30 // Factory getters to override in subclasses. The returned objects will be
31 // injected into the appropriate layer at startup. Subclasses should not
32 // inject these objects themselves. Ownership is retained by
33 // MediaOzonePlatform.
34 virtual VideoDecodeAccelerator* CreateVideoDecodeAccelerator(
35 const base::Callback<bool(void)>& make_context_current);
37 private:
38 static void CreateInstance();
40 static MediaOzonePlatform* instance_;
42 DISALLOW_COPY_AND_ASSIGN(MediaOzonePlatform);
45 } // namespace media
47 #endif // MEDIA_OZONE_MEDIA_OZONE_PLATFORM_H_