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

Unified Diff: services/ui/ime/ime_driver_bridge.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ime/ime_driver_bridge.h ('k') | services/ui/ime/ime_registrar_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ime/ime_driver_bridge.cc
diff --git a/services/ui/ime/ime_server_impl.cc b/services/ui/ime/ime_driver_bridge.cc
similarity index 67%
rename from services/ui/ime/ime_server_impl.cc
rename to services/ui/ime/ime_driver_bridge.cc
index 7d26f0ed4a807a5ad62f310052fc5f16a4ca5f66..f3b2e59ddcb6204e1b8ae77acaf19b24cdc05c78 100644
--- a/services/ui/ime/ime_server_impl.cc
+++ b/services/ui/ime/ime_driver_bridge.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "services/ui/ime/ime_server_impl.h"
+#include "services/ui/ime/ime_driver_bridge.h"
#include "base/memory/ptr_util.h"
#include "services/service_manager/public/cpp/connector.h"
@@ -10,22 +10,22 @@
namespace ui {
-IMEServerImpl::IMEServerImpl() : current_id_(0) {}
+IMEDriverBridge::IMEDriverBridge() {}
-IMEServerImpl::~IMEServerImpl() {}
+IMEDriverBridge::~IMEDriverBridge() {}
-void IMEServerImpl::Init(service_manager::Connector* connector,
- bool is_test_config) {
+void IMEDriverBridge::Init(service_manager::Connector* connector,
+ bool is_test_config) {
if (is_test_config)
connector->StartService("test_ime_driver");
// For non test configs we assume a client registers with us.
}
-void IMEServerImpl::AddBinding(mojom::IMEServerRequest request) {
+void IMEDriverBridge::AddBinding(mojom::IMEDriverRequest request) {
bindings_.AddBinding(this, std::move(request));
}
-void IMEServerImpl::OnDriverChanged(mojom::IMEDriverPtr driver) {
+void IMEDriverBridge::SetDriver(mojom::IMEDriverPtr driver) {
// TODO(moshayedi): crbug.com/669681. Handle switching drivers properly. For
// now we only register the first driver to avoid clients of the previous
// driver from hanging.
@@ -35,18 +35,18 @@ void IMEServerImpl::OnDriverChanged(mojom::IMEDriverPtr driver) {
driver_ = std::move(driver);
while (!pending_requests_.empty()) {
- driver_->StartSession(current_id_++, std::move(pending_requests_.front()));
+ driver_->StartSession(std::move(pending_requests_.front()));
pending_requests_.pop();
}
}
-void IMEServerImpl::StartSession(mojom::StartSessionDetailsPtr details) {
+void IMEDriverBridge::StartSession(mojom::StartSessionDetailsPtr details) {
if (driver_.get()) {
// TODO(moshayedi): crbug.com/634431. This will forward all calls from
// clients to the driver as they are. We may need to check |caret_bounds|
// parameter of InputMethod::OnCaretBoundsChanged() here and limit them to
// client's focused window.
- driver_->StartSession(current_id_++, std::move(details));
+ driver_->StartSession(std::move(details));
} else {
pending_requests_.push(std::move(details));
}
« no previous file with comments | « services/ui/ime/ime_driver_bridge.h ('k') | services/ui/ime/ime_registrar_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698