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

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

Issue 2617883002: Add a new BindInterface() method to Connector. (Closed)
Patch Set: . Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « services/ui/ime/ime_unittest.cc ('k') | services/ui/public/cpp/gpu/gpu.cc » ('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 "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "mojo/public/cpp/bindings/strong_binding.h" 8 #include "mojo/public/cpp/bindings/strong_binding.h"
9 #include "services/service_manager/public/cpp/connector.h" 9 #include "services/service_manager/public/cpp/connector.h"
10 #include "services/service_manager/public/cpp/service_context.h" 10 #include "services/service_manager/public/cpp/service_context.h"
11 #include "services/ui/ime/test_ime_driver/test_ime_driver.h" 11 #include "services/ui/ime/test_ime_driver/test_ime_driver.h"
12 #include "services/ui/public/interfaces/constants.mojom.h" 12 #include "services/ui/public/interfaces/constants.mojom.h"
13 #include "services/ui/public/interfaces/ime/ime.mojom.h" 13 #include "services/ui/public/interfaces/ime/ime.mojom.h"
14 14
15 namespace ui { 15 namespace ui {
16 namespace test { 16 namespace test {
17 17
18 TestIMEApplication::TestIMEApplication() {} 18 TestIMEApplication::TestIMEApplication() {}
19 19
20 TestIMEApplication::~TestIMEApplication() {} 20 TestIMEApplication::~TestIMEApplication() {}
21 21
22 void TestIMEApplication::OnStart() { 22 void TestIMEApplication::OnStart() {
23 mojom::IMEDriverPtr ime_driver_ptr; 23 mojom::IMEDriverPtr ime_driver_ptr;
24 mojo::MakeStrongBinding(base::MakeUnique<TestIMEDriver>(), 24 mojo::MakeStrongBinding(base::MakeUnique<TestIMEDriver>(),
25 MakeRequest(&ime_driver_ptr)); 25 MakeRequest(&ime_driver_ptr));
26 26
27 ui::mojom::IMERegistrarPtr ime_registrar; 27 ui::mojom::IMERegistrarPtr ime_registrar;
28 context()->connector()->ConnectToInterface(ui::mojom::kServiceName, 28 context()->connector()->BindInterface(ui::mojom::kServiceName,
29 &ime_registrar); 29 &ime_registrar);
30 ime_registrar->RegisterDriver(std::move(ime_driver_ptr)); 30 ime_registrar->RegisterDriver(std::move(ime_driver_ptr));
31 } 31 }
32 32
33 bool TestIMEApplication::OnConnect( 33 bool TestIMEApplication::OnConnect(
34 const service_manager::ServiceInfo& remote_info, 34 const service_manager::ServiceInfo& remote_info,
35 service_manager::InterfaceRegistry* registry) { 35 service_manager::InterfaceRegistry* registry) {
36 return true; 36 return true;
37 } 37 }
38 38
39 } // namespace test 39 } // namespace test
40 } // namespace ui 40 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ime/ime_unittest.cc ('k') | services/ui/public/cpp/gpu/gpu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698