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

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

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: specify ownership in the Bind call 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
Index: mojo/services/surfaces/surfaces_service_application.cc
diff --git a/mojo/services/surfaces/surfaces_service_application.cc b/mojo/services/surfaces/surfaces_service_application.cc
index 9c9e3f857fca0f1803c26f557f5aee87a57c6a04..4dfa4a2df42fd32f5b9f0a61670d9f04d112f166 100644
--- a/mojo/services/surfaces/surfaces_service_application.cc
+++ b/mojo/services/surfaces/surfaces_service_application.cc
@@ -18,16 +18,15 @@ SurfacesServiceApplication::~SurfacesServiceApplication() {
bool SurfacesServiceApplication::ConfigureIncomingConnection(
ApplicationConnection* connection) {
- connection->AddService<SurfacesImpl, SurfacesImpl::Context>(this);
+ connection->AddServiceProvider(this);
return true;
}
-cc::SurfaceManager* SurfacesServiceApplication::Manager() {
- return &manager_;
-}
-
-uint32_t SurfacesServiceApplication::IdNamespace() {
- return next_id_namespace_++;
+void SurfacesServiceApplication::BindToRequest(
+ ApplicationConnection* connection,
+ InterfaceRequest<Surface> request) {
+ mojo::BindToRequest(new SurfacesImpl(&manager_, next_id_namespace_++, this),
+ &request);
}
void SurfacesServiceApplication::FrameSubmitted() {

Powered by Google App Engine
This is Rietveld 408576698