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

Unified Diff: shell/test/pingable_app.cc

Issue 1980763002: ApplicationConnection devolution, part 2.3. (Closed) Base URL: https://github.com/domokit/mojo.git@work794_app_conn_devo_2.2
Patch Set: Created 4 years, 7 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: shell/test/pingable_app.cc
diff --git a/shell/test/pingable_app.cc b/shell/test/pingable_app.cc
index 2436a7dcba4d70b46d8e975d3487ffc099123f01..f4520f6556eff039e66bb24ae2472331fe8374b5 100644
--- a/shell/test/pingable_app.cc
+++ b/shell/test/pingable_app.cc
@@ -8,7 +8,6 @@
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/application_impl.h"
#include "mojo/public/cpp/application/application_runner.h"
-#include "mojo/public/cpp/application/interface_factory.h"
#include "mojo/public/cpp/bindings/callback.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
@@ -39,8 +38,7 @@ class PingableImpl : public Pingable {
std::string connection_url_;
};
-class PingableApp : public mojo::ApplicationDelegate,
- public mojo::InterfaceFactory<Pingable> {
+class PingableApp : public mojo::ApplicationDelegate {
public:
PingableApp() {}
~PingableApp() override {}
@@ -53,17 +51,15 @@ class PingableApp : public mojo::ApplicationDelegate,
bool ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) override {
- connection->AddService(this);
+ connection->GetServiceProviderImpl().AddService<Pingable>(
+ [this](const mojo::ConnectionContext& connection_context,
+ mojo::InterfaceRequest<Pingable> pingable_request) {
+ new PingableImpl(pingable_request.Pass(), app_url_,
+ connection_context.connection_url);
+ });
return true;
}
- // InterfaceFactory<Pingable>:
- void Create(const mojo::ConnectionContext& connection_context,
- mojo::InterfaceRequest<Pingable> request) override {
- new PingableImpl(request.Pass(), app_url_,
- connection_context.connection_url);
- }
-
std::string app_url_;
};
« no previous file with comments | « shell/application_manager/application_manager_unittest.cc ('k') | ui/ozone/platform/drm/mojo/drm_ipc_init_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698