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

Unified Diff: mojo/services/public/cpp/view_manager/tests/view_manager_unittest.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/public/cpp/view_manager/tests/view_manager_unittest.cc
diff --git a/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc b/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
index 31d561832c7711da0bf0d88dd089537bde0b8b56..04fb12b2ef4cca5715664759e986c6de0f90030a 100644
--- a/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
+++ b/mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc
@@ -16,6 +16,7 @@
#include "mojo/services/public/cpp/view_manager/node_observer.h"
#include "mojo/services/public/cpp/view_manager/util.h"
#include "mojo/services/public/cpp/view_manager/view.h"
+#include "mojo/services/public/cpp/view_manager/view_manager_client_factory.h"
#include "mojo/services/public/cpp/view_manager/view_manager_delegate.h"
#include "mojo/services/public/cpp/view_manager/view_observer.h"
#include "mojo/shell/shell_test_helper.h"
@@ -54,8 +55,7 @@ class ConnectServiceLoader : public ServiceLoader,
typedef base::Callback<void(ViewManager*, Node*)> LoadedCallback;
explicit ConnectServiceLoader(const LoadedCallback& callback)
- : callback_(callback) {
- }
+ : callback_(callback), view_manager_client_factory_(this) {}
virtual ~ConnectServiceLoader() {}
private:
@@ -74,7 +74,7 @@ class ConnectServiceLoader : public ServiceLoader,
virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
OVERRIDE {
- ViewManager::ConfigureIncomingConnection(connection, this);
+ connection->AddServiceFactory(&view_manager_client_factory_);
return true;
}
@@ -87,6 +87,7 @@ class ConnectServiceLoader : public ServiceLoader,
ScopedVector<ApplicationImpl> apps_;
LoadedCallback callback_;
+ ViewManagerClientFactory view_manager_client_factory_;
DISALLOW_COPY_AND_ASSIGN(ConnectServiceLoader);
};

Powered by Google App Engine
This is Rietveld 408576698