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

Side by Side Diff: services/ui/ime/test_ime_driver/test_ime_application.cc

Issue 2487573002: Service Manager: Remove ServiceContext* arg from Service::OnStart() (Closed)
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « services/ui/ime/test_ime_driver/test_ime_application.h ('k') | services/ui/service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/ui/ime/test_ime_driver/test_ime_application.h" 5 #include "services/ui/ime/test_ime_driver/test_ime_application.h"
6 6
7 #include "mojo/public/cpp/bindings/strong_binding.h" 7 #include "mojo/public/cpp/bindings/strong_binding.h"
8 #include "services/service_manager/public/cpp/connector.h" 8 #include "services/service_manager/public/cpp/connector.h"
9 #include "services/service_manager/public/cpp/service_context.h" 9 #include "services/service_manager/public/cpp/service_context.h"
10 #include "services/ui/ime/test_ime_driver/test_ime_driver.h" 10 #include "services/ui/ime/test_ime_driver/test_ime_driver.h"
11 #include "services/ui/public/interfaces/ime.mojom.h" 11 #include "services/ui/public/interfaces/ime.mojom.h"
12 12
13 namespace ui { 13 namespace ui {
14 namespace test { 14 namespace test {
15 15
16 TestIMEApplication::TestIMEApplication() {} 16 TestIMEApplication::TestIMEApplication() {}
17 17
18 TestIMEApplication::~TestIMEApplication() {} 18 TestIMEApplication::~TestIMEApplication() {}
19 19
20 void TestIMEApplication::OnStart(service_manager::ServiceContext* context) { 20 void TestIMEApplication::OnStart() {
21 mojom::IMEDriverPtr ime_driver_ptr; 21 mojom::IMEDriverPtr ime_driver_ptr;
22 mojo::MakeStrongBinding(base::MakeUnique<TestIMEDriver>(), 22 mojo::MakeStrongBinding(base::MakeUnique<TestIMEDriver>(),
23 GetProxy(&ime_driver_ptr)); 23 GetProxy(&ime_driver_ptr));
24 24
25 ui::mojom::IMERegistrarPtr ime_registrar; 25 ui::mojom::IMERegistrarPtr ime_registrar;
26 context->connector()->ConnectToInterface("service:ui", &ime_registrar); 26 context()->connector()->ConnectToInterface("service:ui", &ime_registrar);
27 ime_registrar->RegisterDriver(std::move(ime_driver_ptr)); 27 ime_registrar->RegisterDriver(std::move(ime_driver_ptr));
28 } 28 }
29 29
30 bool TestIMEApplication::OnConnect( 30 bool TestIMEApplication::OnConnect(
31 const service_manager::ServiceInfo& remote_info, 31 const service_manager::ServiceInfo& remote_info,
32 service_manager::InterfaceRegistry* registry) { 32 service_manager::InterfaceRegistry* registry) {
33 return true; 33 return true;
34 } 34 }
35 35
36 } // namespace test 36 } // namespace test
37 } // namespace ui 37 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ime/test_ime_driver/test_ime_application.h ('k') | services/ui/service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698