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

Unified Diff: mojo/services/surfaces/surfaces_impl.cc

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix network_service_loader Created 6 years, 5 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
« no previous file with comments | « mojo/services/surfaces/surfaces_impl.h ('k') | mojo/services/surfaces/surfaces_service_application.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/surfaces/surfaces_impl.cc
diff --git a/mojo/services/surfaces/surfaces_impl.cc b/mojo/services/surfaces/surfaces_impl.cc
index da823d3e040cc99bb8217e0a7fe77d1b13e5f520..5baaf6022aa5b09388eca8cfc9ad68606d21647f 100644
--- a/mojo/services/surfaces/surfaces_impl.cc
+++ b/mojo/services/surfaces/surfaces_impl.cc
@@ -16,10 +16,13 @@
namespace mojo {
namespace surfaces {
-SurfacesImpl::SurfacesImpl(ApplicationConnection* app, Context* context)
- : context_(context),
- factory_(context_->Manager(), this),
- id_namespace_(context->IdNamespace()) {
+SurfacesImpl::SurfacesImpl(cc::SurfaceManager* manager,
+ uint32_t id_namespace,
+ Client* client)
+ : manager_(manager),
+ factory_(manager, this),
+ id_namespace_(id_namespace),
+ client_(client) {
}
SurfacesImpl::~SurfacesImpl() {
@@ -47,7 +50,7 @@ void SurfacesImpl::SubmitFrame(SurfaceIdPtr id, FramePtr frame_ptr) {
return;
}
factory_.SubmitFrame(id.To<cc::SurfaceId>(), mojo::ConvertTo(frame_ptr));
- context_->FrameSubmitted();
+ client_->FrameSubmitted();
}
void SurfacesImpl::DestroySurface(SurfaceIdPtr id) {
@@ -72,8 +75,8 @@ void SurfacesImpl::CreateGLES2BoundSurface(CommandBufferPtr gles2_client,
return;
}
if (!display_) {
- display_.reset(new cc::Display(this, context_->Manager(), NULL));
- context_->SetDisplay(display_.get());
+ display_.reset(new cc::Display(this, manager_, NULL));
+ client_->SetDisplay(display_.get());
}
factory_.Create(cc_id, size.To<gfx::Size>());
display_->Resize(cc_id, size.To<gfx::Size>());
« no previous file with comments | « mojo/services/surfaces/surfaces_impl.h ('k') | mojo/services/surfaces/surfaces_service_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698