| OLD | NEW |
| 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/test_ime_driver/test_ime_driver.h" | 5 #include "services/ui/ime/test_ime_driver/test_ime_driver.h" |
| 6 | 6 |
| 7 #include "services/ui/public/interfaces/ime/ime.mojom.h" | 7 #include "services/ui/public/interfaces/ime/ime.mojom.h" |
| 8 | 8 |
| 9 namespace ui { | 9 namespace ui { |
| 10 namespace test { | 10 namespace test { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 mojom::TextInputClientPtr client_; | 36 mojom::TextInputClientPtr client_; |
| 37 | 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(TestInputMethod); | 38 DISALLOW_COPY_AND_ASSIGN(TestInputMethod); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 TestIMEDriver::TestIMEDriver() {} | 41 TestIMEDriver::TestIMEDriver() {} |
| 42 | 42 |
| 43 TestIMEDriver::~TestIMEDriver() {} | 43 TestIMEDriver::~TestIMEDriver() {} |
| 44 | 44 |
| 45 void TestIMEDriver::StartSession( | 45 void TestIMEDriver::StartSession(int32_t session_id, |
| 46 int32_t session_id, | 46 mojom::StartSessionDetailsPtr details) { |
| 47 mojom::TextInputClientPtr client, | |
| 48 mojom::InputMethodRequest input_method_request) { | |
| 49 input_method_bindings_[session_id].reset( | 47 input_method_bindings_[session_id].reset( |
| 50 new mojo::Binding<mojom::InputMethod>( | 48 new mojo::Binding<mojom::InputMethod>( |
| 51 new TestInputMethod(std::move(client)), | 49 new TestInputMethod(std::move(details->client)), |
| 52 std::move(input_method_request))); | 50 std::move(details->input_method_request))); |
| 53 } | 51 } |
| 54 | 52 |
| 55 void TestIMEDriver::CancelSession(int32_t session_id) { | 53 void TestIMEDriver::CancelSession(int32_t session_id) { |
| 56 input_method_bindings_.erase(session_id); | 54 input_method_bindings_.erase(session_id); |
| 57 } | 55 } |
| 58 | 56 |
| 59 } // namespace test | 57 } // namespace test |
| 60 } // namespace ui | 58 } // namespace ui |
| OLD | NEW |