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 "components/arc/ime/arc_ime_service.h" | 5 #include "components/arc/ime/arc_ime_service.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 void SendSetCompositionText(const ui::CompositionText& composition) override { | 28 void SendSetCompositionText(const ui::CompositionText& composition) override { |
29 } | 29 } |
30 void SendConfirmCompositionText() override { | 30 void SendConfirmCompositionText() override { |
31 } | 31 } |
32 void SendInsertText(const base::string16& text) override { | 32 void SendInsertText(const base::string16& text) override { |
33 count_send_insert_text_++; | 33 count_send_insert_text_++; |
34 } | 34 } |
35 void SendOnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override { | 35 void SendOnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override { |
36 } | 36 } |
| 37 void SendExtendSelectionAndDelete(size_t before, size_t after) override { |
| 38 } |
37 | 39 |
38 int count_send_insert_text() const { return count_send_insert_text_; } | 40 int count_send_insert_text() const { return count_send_insert_text_; } |
39 | 41 |
40 private: | 42 private: |
41 int count_send_insert_text_; | 43 int count_send_insert_text_; |
42 }; | 44 }; |
43 | 45 |
44 class FakeInputMethod : public ui::DummyInputMethod { | 46 class FakeInputMethod : public ui::DummyInputMethod { |
45 public: | 47 public: |
46 FakeInputMethod() : client_(nullptr), | 48 FakeInputMethod() : client_(nullptr), |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 instance_->InsertChar(ui::KeyEvent('a', ui::VKEY_A, 0)); | 172 instance_->InsertChar(ui::KeyEvent('a', ui::VKEY_A, 0)); |
171 EXPECT_EQ(0, fake_arc_ime_bridge_->count_send_insert_text()); | 173 EXPECT_EQ(0, fake_arc_ime_bridge_->count_send_insert_text()); |
172 | 174 |
173 // When the bridge is accepting text inputs, forward the event. | 175 // When the bridge is accepting text inputs, forward the event. |
174 instance_->OnTextInputTypeChanged(ui::TEXT_INPUT_TYPE_TEXT); | 176 instance_->OnTextInputTypeChanged(ui::TEXT_INPUT_TYPE_TEXT); |
175 instance_->InsertChar(ui::KeyEvent('a', ui::VKEY_A, 0)); | 177 instance_->InsertChar(ui::KeyEvent('a', ui::VKEY_A, 0)); |
176 EXPECT_EQ(1, fake_arc_ime_bridge_->count_send_insert_text()); | 178 EXPECT_EQ(1, fake_arc_ime_bridge_->count_send_insert_text()); |
177 } | 179 } |
178 | 180 |
179 } // namespace arc | 181 } // namespace arc |
OLD | NEW |