| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 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 CONTENT_BROWSER_MEDIA_VIDEO_SURFACE_MANAGER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_MEDIA_VIDEO_SURFACE_MANAGER_IMPL_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/lazy_instance.h" |
| 11 #include "base/macros.h" |
| 12 #include "content/common/content_export.h" |
| 13 #include "content/public/browser/android/video_surface_manager.h" |
| 14 |
| 15 namespace content { |
| 16 |
| 17 class CONTENT_EXPORT VideoSurfaceManagerImpl : |
| 18 NON_EXPORTED_BASE(public VideoSurfaceManager) { |
| 19 public: |
| 20 // Returns the VideoSurfaceManagerImpl singleton. |
| 21 static VideoSurfaceManagerImpl* GetInstance(); |
| 22 |
| 23 // VideoSurfaceManager implementation. |
| 24 void SetOverrideVideoSurfaceProvider( |
| 25 VideoSurfaceProvider* provider) override; |
| 26 void RemoveOverrideVideoSurfaceProvider( |
| 27 VideoSurfaceProvider* provider) override; |
| 28 VideoSurfaceProvider* GetVideoSurfaceProvider( |
| 29 WebContents* web_contents) override; |
| 30 |
| 31 private: |
| 32 friend struct base::DefaultLazyInstanceTraits<VideoSurfaceManagerImpl>; |
| 33 friend class VideoSurfaceManagerImplTest; |
| 34 |
| 35 VideoSurfaceManagerImpl(); |
| 36 ~VideoSurfaceManagerImpl() override; |
| 37 |
| 38 std::unique_ptr<VideoSurfaceProvider> current_provider_; |
| 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(VideoSurfaceManagerImpl); |
| 41 }; |
| 42 |
| 43 } // namespace content |
| 44 |
| 45 #endif // CONTENT_BROWSER_MEDIA_VIDEO_SURFACE_MANAGER_IMPL_H_ |
| OLD | NEW |