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

Unified Diff: media/gpu/content_video_view_overlay_factory.cc

Issue 2813303003: Add AndroidVideoSurfaceChooser to manage overlays. (Closed)
Patch Set: gn fixes for non-android Created 3 years, 8 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/gpu/content_video_view_overlay_factory.cc
diff --git a/media/gpu/content_video_view_overlay_factory.cc b/media/gpu/content_video_view_overlay_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f54f185174336b582d7a1fcf113b680011232679
--- /dev/null
+++ b/media/gpu/content_video_view_overlay_factory.cc
@@ -0,0 +1,26 @@
+// 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.
+
+#include "media/gpu/content_video_view_overlay_factory.h"
+
+#include "base/memory/ptr_util.h"
+#include "media/base/surface_manager.h"
+#include "media/gpu/content_video_view_overlay.h"
+
+namespace media {
+
+ContentVideoViewOverlayFactory::ContentVideoViewOverlayFactory(
+ int32_t surface_id)
+ : surface_id_(surface_id) {
+ DCHECK(surface_id_ != SurfaceManager::kNoSurfaceID);
DaleCurtis 2017/04/20 19:10:43 DCHECK_NE.
liberato (no reviews please) 2017/04/20 22:01:39 Done.
+}
+
+ContentVideoViewOverlayFactory::~ContentVideoViewOverlayFactory() {}
+
+std::unique_ptr<AndroidOverlay> ContentVideoViewOverlayFactory::CreateOverlay(
+ const AndroidOverlay::Config& config) {
+ return base::MakeUnique<ContentVideoViewOverlay>(surface_id_, config);
+}
+
+} // namespace media

Powered by Google App Engine
This is Rietveld 408576698