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

Side by Side Diff: services/ui/ime/ime_server_impl.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
« no previous file with comments | « services/ui/ime/ime_server_impl.h ('k') | services/ui/ime/ime_unittest.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/ime_server_impl.h" 5 #include "services/ui/ime/ime_server_impl.h"
6 6
7 #include "services/shell/public/cpp/connector.h"
7 #include "services/ui/ime/ime_registrar_impl.h" 8 #include "services/ui/ime/ime_registrar_impl.h"
8 9
9 namespace ui { 10 namespace ui {
10 11
11 IMEServerImpl::IMEServerImpl() : current_id_(0) {} 12 IMEServerImpl::IMEServerImpl() : current_id_(0) {}
12 13
13 IMEServerImpl::~IMEServerImpl() {} 14 IMEServerImpl::~IMEServerImpl() {}
14 15
16 void IMEServerImpl::Init(shell::Connector* connector) {
17 // TODO(moshayedi): crbug.com/641041. Look up the driver from the mojo:catalog
18 // service.
19 connector->Connect("mojo:test_ime_driver");
20 }
21
15 void IMEServerImpl::AddBinding(mojom::IMEServerRequest request) { 22 void IMEServerImpl::AddBinding(mojom::IMEServerRequest request) {
16 bindings_.AddBinding(this, std::move(request)); 23 bindings_.AddBinding(this, std::move(request));
17 } 24 }
18 25
19 void IMEServerImpl::OnDriverChanged(mojom::IMEDriverPtr driver) { 26 void IMEServerImpl::OnDriverChanged(mojom::IMEDriverPtr driver) {
20 driver_ = std::move(driver); 27 driver_ = std::move(driver);
21 28
22 while (!pending_requests_.empty()) { 29 while (!pending_requests_.empty()) {
23 driver_->StartSession(current_id_++, 30 driver_->StartSession(current_id_++,
24 std::move(pending_requests_.front().first), 31 std::move(pending_requests_.front().first),
(...skipping 12 matching lines...) Expand all
37 // client's focused window. 44 // client's focused window.
38 driver_->StartSession(current_id_++, std::move(client), 45 driver_->StartSession(current_id_++, std::move(client),
39 std::move(input_method_request)); 46 std::move(input_method_request));
40 } else { 47 } else {
41 pending_requests_.push( 48 pending_requests_.push(
42 std::make_pair(std::move(client), std::move(input_method_request))); 49 std::make_pair(std::move(client), std::move(input_method_request)));
43 } 50 }
44 } 51 }
45 52
46 } // namespace ui 53 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ime/ime_server_impl.h ('k') | services/ui/ime/ime_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698