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

Unified Diff: content/browser/compositor/frame_sink_manager_host.cc

Issue 2803993003: Introduce FrameSinkManagerHost in content/browser/. (Closed)
Patch Set: Fix 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: content/browser/compositor/frame_sink_manager_host.cc
diff --git a/content/browser/compositor/frame_sink_manager_host.cc b/content/browser/compositor/frame_sink_manager_host.cc
new file mode 100644
index 0000000000000000000000000000000000000000..089abdb261b76fd90b8d288092330150d88ff8ff
--- /dev/null
+++ b/content/browser/compositor/frame_sink_manager_host.cc
@@ -0,0 +1,56 @@
+// 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 "content/browser/compositor/frame_sink_manager_host.h"
+
+#include <utility>
+
+#include "cc/surfaces/surface_info.h"
+#include "cc/surfaces/surface_manager.h"
+
+namespace content {
+
+FrameSinkManagerHost::FrameSinkManagerHost()
+ : binding_(this),
+ frame_sink_manager_(false, // Use surface sequences.
+ nullptr,
+ MakeRequest(&frame_sink_manager_ptr_),
+ binding_.CreateInterfacePtrAndBind()) {}
+
+FrameSinkManagerHost::~FrameSinkManagerHost() {}
+
+cc::SurfaceManager* FrameSinkManagerHost::surface_manager() {
+ return frame_sink_manager_.surface_manager();
+}
+
+void FrameSinkManagerHost::CreateCompositorFrameSink(
+ const cc::FrameSinkId& frame_sink_id,
+ cc::mojom::MojoCompositorFrameSinkRequest request,
+ cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request,
+ cc::mojom::MojoCompositorFrameSinkClientPtr client) {
+ frame_sink_manager_ptr_->CreateCompositorFrameSink(
+ frame_sink_id, std::move(request), std::move(private_request),
+ std::move(client));
+}
+
+void FrameSinkManagerHost::RegisterFrameSinkHierarchy(
+ const cc::FrameSinkId& parent_frame_sink_id,
+ const cc::FrameSinkId& child_frame_sink_id) {
+ frame_sink_manager_ptr_->RegisterFrameSinkHierarchy(parent_frame_sink_id,
+ child_frame_sink_id);
+}
+
+void FrameSinkManagerHost::UnregisterFrameSinkHierarchy(
+ const cc::FrameSinkId& parent_frame_sink_id,
+ const cc::FrameSinkId& child_frame_sink_id) {
+ frame_sink_manager_ptr_->UnregisterFrameSinkHierarchy(parent_frame_sink_id,
+ child_frame_sink_id);
+}
+
+void FrameSinkManagerHost::OnSurfaceCreated(
+ const cc::SurfaceInfo& surface_info) {
+ // TODO(kylechar): Implement.
+}
+
+} // namespace content
« no previous file with comments | « content/browser/compositor/frame_sink_manager_host.h ('k') | content/browser/compositor/gpu_process_transport_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698