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

Unified Diff: services/ui/ime/test_ime_driver/test_ime_driver.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/test_ime_driver/test_ime_driver.h ('k') | services/ui/manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ime/test_ime_driver/test_ime_driver.cc
diff --git a/services/ui/ime/test_ime_driver/test_ime_driver.cc b/services/ui/ime/test_ime_driver/test_ime_driver.cc
index 613d103e2504daac162d76f98bc0bfdcff8bafeb..8d1aa63f95e689cbe8166acd5aa5b7b8ed1eb4a4 100644
--- a/services/ui/ime/test_ime_driver/test_ime_driver.cc
+++ b/services/ui/ime/test_ime_driver/test_ime_driver.cc
@@ -4,6 +4,7 @@
#include "services/ui/ime/test_ime_driver/test_ime_driver.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
#include "services/ui/public/interfaces/ime/ime.mojom.h"
namespace ui {
@@ -41,16 +42,10 @@ TestIMEDriver::TestIMEDriver() {}
TestIMEDriver::~TestIMEDriver() {}
-void TestIMEDriver::StartSession(int32_t session_id,
- mojom::StartSessionDetailsPtr details) {
- input_method_bindings_[session_id].reset(
- new mojo::Binding<mojom::InputMethod>(
- new TestInputMethod(std::move(details->client)),
- std::move(details->input_method_request)));
-}
-
-void TestIMEDriver::CancelSession(int32_t session_id) {
- input_method_bindings_.erase(session_id);
+void TestIMEDriver::StartSession(mojom::StartSessionDetailsPtr details) {
+ mojo::MakeStrongBinding(
+ base::MakeUnique<TestInputMethod>(std::move(details->client)),
+ std::move(details->input_method_request));
}
} // namespace test
« no previous file with comments | « services/ui/ime/test_ime_driver/test_ime_driver.h ('k') | services/ui/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698