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

Unified Diff: ui/base/ime/dummy_text_input_client.cc

Issue 1771173002: Implement input.ime.sendKeyEvents API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test failure. Created 4 years, 9 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 | « ui/base/ime/dummy_text_input_client.h ('k') | ui/base/ime/ime_input_context_handler_interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/dummy_text_input_client.cc
diff --git a/ui/base/ime/dummy_text_input_client.cc b/ui/base/ime/dummy_text_input_client.cc
index 478b489b4c8ff58a0321b4a1d11b216032433108..ac9b97343ab9eb0203d80adf36b6900156d60973 100644
--- a/ui/base/ime/dummy_text_input_client.cc
+++ b/ui/base/ime/dummy_text_input_client.cc
@@ -3,15 +3,16 @@
// found in the LICENSE file.
#include "ui/base/ime/dummy_text_input_client.h"
+#include "ui/events/event.h"
#include "ui/gfx/geometry/rect.h"
namespace ui {
DummyTextInputClient::DummyTextInputClient()
- : text_input_type_(TEXT_INPUT_TYPE_NONE) {}
+ : text_input_type_(TEXT_INPUT_TYPE_NONE), insert_char_count_(0) {}
DummyTextInputClient::DummyTextInputClient(TextInputType text_input_type)
- : text_input_type_(text_input_type) {}
+ : text_input_type_(text_input_type), insert_char_count_(0) {}
DummyTextInputClient::~DummyTextInputClient() {
}
@@ -29,7 +30,10 @@ void DummyTextInputClient::ClearCompositionText() {
void DummyTextInputClient::InsertText(const base::string16& text) {
}
-void DummyTextInputClient::InsertChar(const KeyEvent& event) {}
+void DummyTextInputClient::InsertChar(const KeyEvent& event) {
+ ++insert_char_count_;
+ last_insert_char_ = event.GetCharacter();
+}
TextInputType DummyTextInputClient::GetTextInputType() const {
return text_input_type_;
« no previous file with comments | « ui/base/ime/dummy_text_input_client.h ('k') | ui/base/ime/ime_input_context_handler_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698