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

Side by Side Diff: services/ui/ime/ime_registrar_impl.cc

Issue 2945283002: Unify IMEDriver and IMEServer. (Closed)
Patch Set: Addressed feedback. Created 3 years, 6 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_registrar_impl.h ('k') | services/ui/ime/ime_server_impl.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/ime_registrar_impl.h" 5 #include "services/ui/ime/ime_registrar_impl.h"
6 6
7 namespace ui { 7 namespace ui {
8 8
9 IMERegistrarImpl::IMERegistrarImpl(IMEServerImpl* ime_server) 9 IMERegistrarImpl::IMERegistrarImpl(IMEDriverBridge* ime_driver_bridge)
10 : ime_server_(ime_server) {} 10 : ime_driver_bridge_(ime_driver_bridge) {}
11 11
12 IMERegistrarImpl::~IMERegistrarImpl() {} 12 IMERegistrarImpl::~IMERegistrarImpl() {}
13 13
14 void IMERegistrarImpl::AddBinding(mojom::IMERegistrarRequest request) { 14 void IMERegistrarImpl::AddBinding(mojom::IMERegistrarRequest request) {
15 bindings_.AddBinding(this, std::move(request)); 15 bindings_.AddBinding(this, std::move(request));
16 } 16 }
17 17
18 void IMERegistrarImpl::RegisterDriver(mojom::IMEDriverPtr driver) { 18 void IMERegistrarImpl::RegisterDriver(mojom::IMEDriverPtr driver) {
19 // TODO(moshayedi): crbug.com/634441. IMERegistrarImpl currently identifies 19 // TODO(moshayedi): crbug.com/634441. IMERegistrarImpl currently identifies
20 // the last registered driver as the current driver. Rethink this once we 20 // the last registered driver as the current driver. Rethink this once we
21 // have more usecases. 21 // have more usecases.
22 ime_server_->OnDriverChanged(std::move(driver)); 22 ime_driver_bridge_->SetDriver(std::move(driver));
23 } 23 }
24 } // namespace ui 24 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ime/ime_registrar_impl.h ('k') | services/ui/ime/ime_server_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698