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

Unified Diff: services/ui/ime/test_ime_driver/test_ime_application.cc

Issue 2476063002: Service Manager: Rework Service and ServiceContext lifetime (Closed)
Patch Set: . Created 4 years, 1 month 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/ui/ime/test_ime_driver/test_ime_application.cc
diff --git a/services/ui/ime/test_ime_driver/test_ime_application.cc b/services/ui/ime/test_ime_driver/test_ime_application.cc
index c5b78f4e4cd60580869559dc8c5dee79c6d3123c..d84e4481fd0d442a47aec2cda02e6ded842f8f88 100644
--- a/services/ui/ime/test_ime_driver/test_ime_application.cc
+++ b/services/ui/ime/test_ime_driver/test_ime_application.cc
@@ -6,6 +6,7 @@
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "services/service_manager/public/cpp/connector.h"
+#include "services/service_manager/public/cpp/service_context.h"
#include "services/ui/ime/test_ime_driver/test_ime_driver.h"
#include "services/ui/public/interfaces/ime.mojom.h"
@@ -16,21 +17,21 @@ TestIMEApplication::TestIMEApplication() {}
TestIMEApplication::~TestIMEApplication() {}
-bool TestIMEApplication::OnConnect(
- const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) {
- return true;
-}
-
-void TestIMEApplication::OnStart(const service_manager::ServiceInfo& info) {
+void TestIMEApplication::OnStart(service_manager::ServiceContext* context) {
mojom::IMEDriverPtr ime_driver_ptr;
mojo::MakeStrongBinding(base::MakeUnique<TestIMEDriver>(),
GetProxy(&ime_driver_ptr));
ui::mojom::IMERegistrarPtr ime_registrar;
- connector()->ConnectToInterface("service:ui", &ime_registrar);
+ context->connector()->ConnectToInterface("service:ui", &ime_registrar);
ime_registrar->RegisterDriver(std::move(ime_driver_ptr));
}
+bool TestIMEApplication::OnConnect(
+ const service_manager::ServiceInfo& remote_info,
+ service_manager::InterfaceRegistry* registry) {
+ return true;
+}
+
} // namespace test
} // namespace ui
« no previous file with comments | « services/ui/ime/test_ime_driver/test_ime_application.h ('k') | services/ui/public/cpp/tests/window_server_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698