OLD | NEW |
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/constants.mojom.h" | 11 #include "services/ui/public/interfaces/constants.mojom.h" |
12 #include "services/ui/public/interfaces/ime/ime.mojom.h" | 12 #include "services/ui/public/interfaces/ime/ime.mojom.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 namespace test { | 15 namespace test { |
16 | 16 |
17 TestIMEApplication::TestIMEApplication() {} | 17 TestIMEApplication::TestIMEApplication() {} |
18 | 18 |
19 TestIMEApplication::~TestIMEApplication() {} | 19 TestIMEApplication::~TestIMEApplication() {} |
20 | 20 |
21 void TestIMEApplication::OnStart() { | 21 void TestIMEApplication::OnStart() { |
22 mojom::IMEDriverPtr ime_driver_ptr; | 22 mojom::IMEDriverPtr ime_driver_ptr; |
23 mojo::MakeStrongBinding(base::MakeUnique<TestIMEDriver>(), | 23 mojo::MakeStrongBinding(base::MakeUnique<TestIMEDriver>(), |
24 GetProxy(&ime_driver_ptr)); | 24 MakeRequest(&ime_driver_ptr)); |
25 | 25 |
26 ui::mojom::IMERegistrarPtr ime_registrar; | 26 ui::mojom::IMERegistrarPtr ime_registrar; |
27 context()->connector()->ConnectToInterface(ui::mojom::kServiceName, | 27 context()->connector()->ConnectToInterface(ui::mojom::kServiceName, |
28 &ime_registrar); | 28 &ime_registrar); |
29 ime_registrar->RegisterDriver(std::move(ime_driver_ptr)); | 29 ime_registrar->RegisterDriver(std::move(ime_driver_ptr)); |
30 } | 30 } |
31 | 31 |
32 bool TestIMEApplication::OnConnect( | 32 bool TestIMEApplication::OnConnect( |
33 const service_manager::ServiceInfo& remote_info, | 33 const service_manager::ServiceInfo& remote_info, |
34 service_manager::InterfaceRegistry* registry) { | 34 service_manager::InterfaceRegistry* registry) { |
35 return true; | 35 return true; |
36 } | 36 } |
37 | 37 |
38 } // namespace test | 38 } // namespace test |
39 } // namespace ui | 39 } // namespace ui |
OLD | NEW |