Chromium Code Reviews| Index: content/browser/compositor/frame_sink_manager_host.h |
| diff --git a/content/browser/compositor/frame_sink_manager_host.h b/content/browser/compositor/frame_sink_manager_host.h |
| index a4397302827a022c14adfc35c66369efafc538dd..4be010ff4ad2db92d32b1dffe5366d8eaa4055c0 100644 |
| --- a/content/browser/compositor/frame_sink_manager_host.h |
| +++ b/content/browser/compositor/frame_sink_manager_host.h |
| @@ -5,10 +5,14 @@ |
| #ifndef CONTENT_BROWSER_COMPOSITOR_FRAME_SINK_MANAGER_HOST_H_ |
| #define CONTENT_BROWSER_COMPOSITOR_FRAME_SINK_MANAGER_HOST_H_ |
| +#include "base/compiler_specific.h" |
| #include "base/macros.h" |
| +#include "base/observer_list.h" |
| #include "cc/ipc/frame_sink_manager.mojom.h" |
| #include "cc/surfaces/frame_sink_id.h" |
| +#include "cc/surfaces/surface_observer.h" |
| #include "components/viz/frame_sinks/mojo_frame_sink_manager.h" |
| +#include "content/common/content_export.h" |
| #include "mojo/public/cpp/bindings/binding.h" |
| namespace cc { |
| @@ -19,14 +23,18 @@ class SurfaceManager; |
| namespace content { |
| // Browser side implementation of mojom::FrameSinkManager. Manages frame sinks |
| -// and is inteded to replace SurfaceManager. |
| -class FrameSinkManagerHost : cc::mojom::FrameSinkManagerClient { |
| +// and is intended to replace SurfaceManager. |
| +class CONTENT_EXPORT FrameSinkManagerHost |
| + : NON_EXPORTED_BASE(cc::mojom::FrameSinkManagerClient) { |
| public: |
| FrameSinkManagerHost(); |
| ~FrameSinkManagerHost() override; |
| cc::SurfaceManager* surface_manager(); |
| + void AddObserver(cc::SurfaceObserver* observer); |
|
Fady Samuel
2017/04/11 16:43:53
Maybe I'm being pedantic but SurfaceObserver seems
kylechar
2017/04/11 16:52:39
Ya, I think that's sounds totally reasonable to ha
kylechar
2017/04/11 16:53:30
If so, I should add a TODO saying as much.
Fady Samuel
2017/04/11 17:02:47
It seems like those things are orthogonal.
FrameS
|
| + void RemoveObserver(cc::SurfaceObserver* observer); |
| + |
| // See frame_sink_manager.mojom for descriptions. |
| void CreateCompositorFrameSink( |
| const cc::FrameSinkId& frame_sink_id, |
| @@ -53,6 +61,8 @@ class FrameSinkManagerHost : cc::mojom::FrameSinkManagerClient { |
| // happen using Mojo. See http://crbug.com/657959. |
| viz::MojoFrameSinkManager frame_sink_manager_; |
| + base::ObserverList<cc::SurfaceObserver> observers_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(FrameSinkManagerHost); |
| }; |