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

Unified Diff: services/keyboard/linux/main.cc

Issue 1981513002: ApplicationConnection devolution, part 2.2. (Closed) Base URL: https://github.com/domokit/mojo.git@master
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
« no previous file with comments | « services/icu_data/icu_data_impl.cc ('k') | services/log/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/keyboard/linux/main.cc
diff --git a/services/keyboard/linux/main.cc b/services/keyboard/linux/main.cc
index 397a4f2a32b29982c0a227e3a7e191b79e00ba57..6ca21bd7a98e707ecd28df689920aaa7d8f2cb8e 100644
--- a/services/keyboard/linux/main.cc
+++ b/services/keyboard/linux/main.cc
@@ -10,7 +10,6 @@
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/application_impl.h"
#include "mojo/public/cpp/application/connect.h"
-#include "mojo/public/cpp/application/interface_factory.h"
#include "mojo/services/native_viewport/interfaces/native_viewport_event_dispatcher.mojom.h"
#include "services/keyboard/linux/keyboard_service_impl.h"
@@ -22,7 +21,7 @@ public:
mojo::InterfaceRequest<KeyboardServiceFactory> request)
: binding_(this, request.Pass()) {}
- // |InterfaceFactory<KeyboardService>| implementation:
+ // |keyboard::KeyboardServiceFactory| implementation:
void CreateKeyboardService(
mojo::InterfaceRequest<mojo::NativeViewportEventDispatcher> dispatcher,
mojo::InterfaceRequest<KeyboardService> request) override {
@@ -35,9 +34,7 @@ private:
DISALLOW_COPY_AND_ASSIGN(KeyboardServiceFactoryImpl);
};
-class KeyboardServiceApp
- : public mojo::ApplicationDelegate,
- public mojo::InterfaceFactory<KeyboardServiceFactory> {
+class KeyboardServiceApp : public mojo::ApplicationDelegate {
public:
KeyboardServiceApp() {}
~KeyboardServiceApp() override {}
@@ -47,18 +44,16 @@ class KeyboardServiceApp
// |ApplicationDelegate| override:
bool ConfigureIncomingConnection(
mojo::ApplicationConnection* connection) override {
- connection->AddService<KeyboardServiceFactory>(this);
+ connection->GetServiceProviderImpl().AddService<KeyboardServiceFactory>([](
+ const mojo::ConnectionContext& connection_context,
+ mojo::InterfaceRequest<KeyboardServiceFactory>
+ keyboard_service_factory_request) {
+ new KeyboardServiceFactoryImpl(keyboard_service_factory_request.Pass());
+ });
return true;
}
- // |InterfaceFactory<KeyboardService>| implementation:
- void Create(const mojo::ConnectionContext& connection_context,
- mojo::InterfaceRequest<KeyboardServiceFactory> request) override {
- new KeyboardServiceFactoryImpl(request.Pass());
- }
-
private:
-
DISALLOW_COPY_AND_ASSIGN(KeyboardServiceApp);
};
« no previous file with comments | « services/icu_data/icu_data_impl.cc ('k') | services/log/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698