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

Side by Side Diff: content/browser/compositor/frame_sink_manager_host.h

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 unified diff | Download patch
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/compositor/frame_sink_manager_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_COMPOSITOR_FRAME_SINK_MANAGER_HOST_H_
6 #define CONTENT_BROWSER_COMPOSITOR_FRAME_SINK_MANAGER_HOST_H_
7
8 #include "base/macros.h"
9 #include "cc/ipc/frame_sink_manager.mojom.h"
10 #include "cc/surfaces/frame_sink_id.h"
11 #include "components/viz/frame_sinks/mojo_frame_sink_manager.h"
12 #include "mojo/public/cpp/bindings/binding.h"
13
14 namespace cc {
15 class SurfaceInfo;
16 class SurfaceManager;
17 }
18
19 namespace content {
20
21 // Browser side implementation of mojom::FrameSinkManager. Manages frame sinks
22 // and is inteded to replace SurfaceManager.
23 class FrameSinkManagerHost : cc::mojom::FrameSinkManagerClient {
24 public:
25 FrameSinkManagerHost();
26 ~FrameSinkManagerHost() override;
27
28 cc::SurfaceManager* surface_manager();
29
30 // See frame_sink_manager.mojom for descriptions.
31 void CreateCompositorFrameSink(
32 const cc::FrameSinkId& frame_sink_id,
33 cc::mojom::MojoCompositorFrameSinkRequest request,
34 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request,
35 cc::mojom::MojoCompositorFrameSinkClientPtr client);
36 void RegisterFrameSinkHierarchy(const cc::FrameSinkId& parent_frame_sink_id,
37 const cc::FrameSinkId& child_frame_sink_id);
38 void UnregisterFrameSinkHierarchy(const cc::FrameSinkId& parent_frame_sink_id,
39 const cc::FrameSinkId& child_frame_sink_id);
40
41 private:
42 // cc::mojom::FrameSinkManagerClient:
43 void OnSurfaceCreated(const cc::SurfaceInfo& surface_info) override;
44
45 // Mojo connection to |frame_sink_manager_|.
46 cc::mojom::FrameSinkManagerPtr frame_sink_manager_ptr_;
47
48 // Mojo connection back from |frame_sink_manager_|.
49 mojo::Binding<cc::mojom::FrameSinkManagerClient> binding_;
50
51 // This is owned here so that SurfaceManager will be accessible in process.
52 // Other than using SurfaceManager, access to |frame_sink_manager_| should
53 // happen using Mojo. See http://crbug.com/657959.
54 viz::MojoFrameSinkManager frame_sink_manager_;
55
56 DISALLOW_COPY_AND_ASSIGN(FrameSinkManagerHost);
57 };
58
59 } // namespace content
60
61 #endif // CONTENT_BROWSER_COMPOSITOR_FRAME_SINK_MANAGER_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/compositor/frame_sink_manager_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698