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

Unified Diff: mojo/services/window_manager/window_manager_app.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
Index: mojo/services/window_manager/window_manager_app.cc
diff --git a/mojo/services/window_manager/window_manager_app.cc b/mojo/services/window_manager/window_manager_app.cc
index bb096f5c9e3ec21df2469e34db0a0d9bb1e16e54..02e5b95ef789687c02c51c0c45e7844894e1f514 100644
--- a/mojo/services/window_manager/window_manager_app.cc
+++ b/mojo/services/window_manager/window_manager_app.cc
@@ -11,7 +11,6 @@
#include "mojo/public/cpp/application/application_connection.h"
#include "mojo/services/public/cpp/view_manager/node.h"
#include "mojo/services/public/cpp/view_manager/view_manager.h"
-#include "mojo/services/window_manager/window_manager_service_impl.h"
#include "ui/aura/window.h"
#include "ui/aura/window_property.h"
#include "ui/wm/core/capture_controller.h"
@@ -71,7 +70,12 @@ class WMFocusRules : public wm::FocusRules {
////////////////////////////////////////////////////////////////////////////////
// WindowManagerApp, public:
-WindowManagerApp::WindowManagerApp() : view_manager_(NULL), root_(NULL) {}
+WindowManagerApp::WindowManagerApp()
+ : InterfaceFactoryWithContext(this),
+ view_manager_(NULL),
+ view_manager_client_factory_(this),
+ root_(NULL) {
+}
WindowManagerApp::~WindowManagerApp() {
// TODO(beng): Figure out if this should be done in
// OnViewManagerDisconnected().
@@ -136,8 +140,8 @@ void WindowManagerApp::Initialize(ApplicationImpl* impl) {
bool WindowManagerApp::ConfigureIncomingConnection(
ApplicationConnection* connection) {
- connection->AddService<WindowManagerServiceImpl>(this);
- view_manager::ViewManager::ConfigureIncomingConnection(connection, this);
+ connection->AddService(this);
+ connection->AddService(&view_manager_client_factory_);
return true;
}
« no previous file with comments | « mojo/services/window_manager/window_manager_app.h ('k') | mojo/services/window_manager/window_manager_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698