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

Unified Diff: content/browser/media/android/video_surface_manager_impl.h

Issue 2567233002: Use GVR async reprojection video surface for fullscreen in VR shell
Patch Set: Refactor using new interface and manager, also rebased Created 3 years, 11 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: content/browser/media/android/video_surface_manager_impl.h
diff --git a/content/browser/media/android/video_surface_manager_impl.h b/content/browser/media/android/video_surface_manager_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..7ca915de56e2e147b27974550493856449768146
--- /dev/null
+++ b/content/browser/media/android/video_surface_manager_impl.h
@@ -0,0 +1,45 @@
+// Copyright 2017 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 CONTENT_BROWSER_MEDIA_VIDEO_SURFACE_MANAGER_IMPL_H_
+#define CONTENT_BROWSER_MEDIA_VIDEO_SURFACE_MANAGER_IMPL_H_
+
+#include <vector>
+
+#include "base/lazy_instance.h"
+#include "base/macros.h"
+#include "content/common/content_export.h"
+#include "content/public/browser/android/video_surface_manager.h"
+
+namespace content {
+
+class CONTENT_EXPORT VideoSurfaceManagerImpl :
+ NON_EXPORTED_BASE(public VideoSurfaceManager) {
+ public:
+ // Returns the VideoSurfaceManagerImpl singleton.
+ static VideoSurfaceManagerImpl* GetInstance();
+
+ // VideoSurfaceManager implementation.
+ void SetOverrideVideoSurfaceProvider(
+ VideoSurfaceProvider* provider) override;
+ void RemoveOverrideVideoSurfaceProvider(
+ VideoSurfaceProvider* provider) override;
+ VideoSurfaceProvider* GetVideoSurfaceProvider(
+ WebContents* web_contents) override;
+
+ private:
+ friend struct base::DefaultLazyInstanceTraits<VideoSurfaceManagerImpl>;
+ friend class VideoSurfaceManagerImplTest;
+
+ VideoSurfaceManagerImpl();
+ ~VideoSurfaceManagerImpl() override;
+
+ std::unique_ptr<VideoSurfaceProvider> current_provider_;
+
+ DISALLOW_COPY_AND_ASSIGN(VideoSurfaceManagerImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_MEDIA_VIDEO_SURFACE_MANAGER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698