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

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

Issue 2230393002: IME for Mus: Make InputMethodMus use the IME Mojo API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update mash_browser_tests_manifest. Created 4 years, 3 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
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/shell/public/c/main.h" 5 #include "services/shell/public/c/main.h"
6 #include "services/shell/public/cpp/connector.h"
7 #include "services/shell/public/cpp/service.h"
8 #include "services/shell/public/cpp/service_runner.h" 6 #include "services/shell/public/cpp/service_runner.h"
9 #include "services/ui/ime/test_ime_driver/test_ime_driver.h" 7 #include "services/ui/ime/test_ime_driver/test_ime_application.h"
10
11 namespace ui {
12 namespace test {
13
14 class TestIME : public shell::Service {
15 public:
16 TestIME() {}
17 ~TestIME() override {}
18
19 private:
20 // shell::Service:
21 void OnStart(const shell::Identity& identity) override {
22 mojom::IMEDriverPtr ime_driver_ptr;
23 new TestIMEDriver(GetProxy(&ime_driver_ptr));
24
25 ui::mojom::IMERegistrarPtr ime_registrar;
26 connector()->ConnectToInterface("mojo:ui", &ime_registrar);
27 ime_registrar->RegisterDriver(std::move(ime_driver_ptr));
28 }
29
30 DISALLOW_COPY_AND_ASSIGN(TestIME);
31 };
32
33 } // namespace test
34 } // namespace ui
35 8
36 MojoResult ServiceMain(MojoHandle service_request_handle) { 9 MojoResult ServiceMain(MojoHandle service_request_handle) {
37 shell::ServiceRunner runner(new ui::test::TestIME); 10 shell::ServiceRunner runner(new ui::test::TestIMEApplication);
38 return runner.Run(service_request_handle); 11 return runner.Run(service_request_handle);
39 } 12 }
OLDNEW
« no previous file with comments | « services/ui/ime/test_ime_driver/BUILD.gn ('k') | services/ui/ime/test_ime_driver/test_ime_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698