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

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

Issue 2015643002: Add (optional) options to Run[Main]Application(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh 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: services/keyboard/linux/main.cc
diff --git a/services/keyboard/linux/main.cc b/services/keyboard/linux/main.cc
index b96e49f331a6f977e332b55fe8389418ebaa1444..4784487781aea45630a19bd3a65b818213160f0c 100644
--- a/services/keyboard/linux/main.cc
+++ b/services/keyboard/linux/main.cc
@@ -3,12 +3,9 @@
// found in the LICENSE file.
#include "base/macros.h"
-#include "base/threading/sequenced_worker_pool.h"
-#include "mojo/application/application_runner_chromium.h"
#include "mojo/public/c/system/main.h"
-#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/application_impl_base.h"
+#include "mojo/public/cpp/application/run_application.h"
#include "mojo/public/cpp/application/service_provider_impl.h"
#include "mojo/services/native_viewport/interfaces/native_viewport_event_dispatcher.mojom.h"
#include "services/keyboard/linux/keyboard_service_impl.h"
@@ -34,15 +31,14 @@ private:
DISALLOW_COPY_AND_ASSIGN(KeyboardServiceFactoryImpl);
};
-class KeyboardServiceApp : public mojo::ApplicationDelegate {
+class KeyboardServiceApp : public mojo::ApplicationImplBase {
public:
KeyboardServiceApp() {}
~KeyboardServiceApp() override {}
private:
-
- // |ApplicationDelegate| override:
- bool ConfigureIncomingConnection(
+ // |ApplicationImplBase| override:
+ bool OnAcceptConnection(
mojo::ServiceProviderImpl* service_provider_impl) override {
service_provider_impl->AddService<KeyboardServiceFactory>([](
const mojo::ConnectionContext& connection_context,
@@ -60,7 +56,6 @@ class KeyboardServiceApp : public mojo::ApplicationDelegate {
} // namespace keyboard
MojoResult MojoMain(MojoHandle application_request) {
- mojo::ApplicationRunnerChromium runner(
- new keyboard::KeyboardServiceApp());
- return runner.Run(application_request);
+ keyboard::KeyboardServiceApp keyboard_service_app;
+ return mojo::RunMainApplication(application_request, &keyboard_service_app);
}

Powered by Google App Engine
This is Rietveld 408576698