| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef MEDIA_OZONE_MEDIA_OZONE_PLATFORM_H_ | |
| 6 #define MEDIA_OZONE_MEDIA_OZONE_PLATFORM_H_ | |
| 7 | |
| 8 #include "base/callback.h" | |
| 9 #include "media/base/media_export.h" | |
| 10 | |
| 11 namespace media { | |
| 12 | |
| 13 class VideoDecodeAccelerator; | |
| 14 | |
| 15 // Class for Ozone platform media implementations. Note that the base class for | |
| 16 // Ozone platform is at ui/ozone. | |
| 17 // | |
| 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(); | |
| 25 | |
| 26 // Besides get the global instance, initializes the subsystems/resources | |
| 27 // necessary for media also. | |
| 28 static MediaOzonePlatform* GetInstance(); | |
| 29 | |
| 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); | |
| 36 | |
| 37 private: | |
| 38 static void CreateInstance(); | |
| 39 | |
| 40 static MediaOzonePlatform* instance_; | |
| 41 | |
| 42 DISALLOW_COPY_AND_ASSIGN(MediaOzonePlatform); | |
| 43 }; | |
| 44 | |
| 45 } // namespace media | |
| 46 | |
| 47 #endif // MEDIA_OZONE_MEDIA_OZONE_PLATFORM_H_ | |
| OLD | NEW |