Index: components/view_manager/surfaces/surfaces_impl.h |
diff --git a/components/view_manager/surfaces/surfaces_impl.h b/components/view_manager/surfaces/surfaces_impl.h |
index f167f380736f5af74b1861f02dc13788b2c6189f..866e997fda1f66fb4c440a8924d771f6512b3747 100644 |
--- a/components/view_manager/surfaces/surfaces_impl.h |
+++ b/components/view_manager/surfaces/surfaces_impl.h |
@@ -10,7 +10,7 @@ |
#include "cc/surfaces/surface_factory_client.h" |
#include "components/view_manager/public/interfaces/command_buffer.mojom.h" |
#include "components/view_manager/public/interfaces/surfaces.mojom.h" |
-#include "components/view_manager/public/interfaces/viewport_parameter_listener.mojom.h" |
+#include "components/view_manager/surfaces/surfaces_state.h" |
#include "mojo/application/public/cpp/application_connection.h" |
#include "mojo/common/weak_binding_set.h" |
#include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" |
@@ -25,14 +25,10 @@ class ApplicationManager; |
namespace surfaces { |
class SurfacesScheduler; |
-class SurfacesServiceApplication; |
class SurfacesImpl : public mojo::Surface, public cc::SurfaceFactoryClient { |
public: |
- SurfacesImpl(SurfacesServiceApplication* application, |
- cc::SurfaceManager* manager, |
- uint32_t id_namespace, |
- SurfacesScheduler* scheduler, |
+ SurfacesImpl(const scoped_refptr<SurfacesState>& state, |
mojo::InterfaceRequest<mojo::Surface> request); |
~SurfacesImpl() override; |
@@ -54,11 +50,12 @@ class SurfacesImpl : public mojo::Surface, public cc::SurfaceFactoryClient { |
private: |
cc::SurfaceId QualifyIdentifier(uint32_t local_id); |
- SurfacesServiceApplication* application_; |
- cc::SurfaceManager* manager_; |
- cc::SurfaceFactory factory_; |
+ scoped_refptr<SurfacesState> state_; |
+ // A Surface ID is an unsigned 64-bit int where the high 32-bits are generated |
+ // by the Surfaces service, and the low 32-bits are generated by the process |
+ // that requested the Surface. |
const uint32_t id_namespace_; |
- SurfacesScheduler* scheduler_; |
+ cc::SurfaceFactory factory_; |
mojo::ScopedMessagePipeHandle command_buffer_handle_; |
mojo::ResourceReturnerPtr returner_; |
mojo::StrongBinding<Surface> binding_; |