| Index: components/view_manager/surfaces/surfaces_impl.cc
|
| diff --git a/components/view_manager/surfaces/surfaces_impl.cc b/components/view_manager/surfaces/surfaces_impl.cc
|
| index 3c6a74b129bfe15388906021e43acdf4c5f2e386..24b36bcc14f6904d079cf536fe216b95b4ac3521 100644
|
| --- a/components/view_manager/surfaces/surfaces_impl.cc
|
| +++ b/components/view_manager/surfaces/surfaces_impl.cc
|
| @@ -9,7 +9,6 @@
|
| #include "cc/resources/returned_resource.h"
|
| #include "cc/surfaces/surface_id_allocator.h"
|
| #include "components/view_manager/surfaces/surfaces_scheduler.h"
|
| -#include "components/view_manager/surfaces/surfaces_service_application.h"
|
| #include "mojo/converters/geometry/geometry_type_converters.h"
|
| #include "mojo/converters/surfaces/surfaces_type_converters.h"
|
|
|
| @@ -23,21 +22,15 @@ void CallCallback(const mojo::Closure& callback, cc::SurfaceDrawStatus status) {
|
| }
|
| }
|
|
|
| -SurfacesImpl::SurfacesImpl(SurfacesServiceApplication* application,
|
| - cc::SurfaceManager* manager,
|
| - uint32_t id_namespace,
|
| - SurfacesScheduler* scheduler,
|
| +SurfacesImpl::SurfacesImpl(const scoped_refptr<SurfacesState>& state,
|
| mojo::InterfaceRequest<mojo::Surface> request)
|
| - : application_(application),
|
| - manager_(manager),
|
| - factory_(manager, this),
|
| - id_namespace_(id_namespace),
|
| - scheduler_(scheduler),
|
| + : state_(state),
|
| + id_namespace_(state->next_id_namespace()),
|
| + factory_(state->manager(), this),
|
| binding_(this, request.Pass()) {
|
| }
|
|
|
| SurfacesImpl::~SurfacesImpl() {
|
| - application_->SurfaceDestroyed(this);
|
| factory_.DestroyAll();
|
| }
|
|
|
| @@ -61,7 +54,7 @@ void SurfacesImpl::SubmitFrame(uint32_t local_id,
|
| factory_.SubmitFrame(QualifyIdentifier(local_id),
|
| frame.To<scoped_ptr<cc::CompositorFrame>>(),
|
| base::Bind(&CallCallback, callback));
|
| - scheduler_->SetNeedsDraw();
|
| + state_->scheduler()->SetNeedsDraw();
|
| }
|
|
|
| void SurfacesImpl::DestroySurface(uint32_t local_id) {
|
|
|