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

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: convert everything over, remove ApplicationConnection::AddService 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..f9da5414ee1d368c0188212207e393847eba52b4 100644
--- a/mojo/services/surfaces/surfaces_service_application.cc
+++ b/mojo/services/surfaces/surfaces_service_application.cc
@@ -18,16 +18,14 @@ SurfacesServiceApplication::~SurfacesServiceApplication() {
bool SurfacesServiceApplication::ConfigureIncomingConnection(
ApplicationConnection* connection) {
- connection->AddService<SurfacesImpl, SurfacesImpl::Context>(this);
+ connection->AddServiceFactory(this);
return true;
}
-cc::SurfaceManager* SurfacesServiceApplication::Manager() {
- return &manager_;
-}
-
-uint32_t SurfacesServiceApplication::IdNamespace() {
- return next_id_namespace_++;
+void SurfacesServiceApplication::Create(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