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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/base/ime/dummy_text_input_client.h" 5 #include "ui/base/ime/dummy_text_input_client.h"
6 #include "ui/events/event.h"
6 #include "ui/gfx/geometry/rect.h" 7 #include "ui/gfx/geometry/rect.h"
7 8
8 namespace ui { 9 namespace ui {
9 10
10 DummyTextInputClient::DummyTextInputClient() 11 DummyTextInputClient::DummyTextInputClient()
11 : text_input_type_(TEXT_INPUT_TYPE_NONE) {} 12 : text_input_type_(TEXT_INPUT_TYPE_NONE), insert_char_count_(0) {}
12 13
13 DummyTextInputClient::DummyTextInputClient(TextInputType text_input_type) 14 DummyTextInputClient::DummyTextInputClient(TextInputType text_input_type)
14 : text_input_type_(text_input_type) {} 15 : text_input_type_(text_input_type), insert_char_count_(0) {}
15 16
16 DummyTextInputClient::~DummyTextInputClient() { 17 DummyTextInputClient::~DummyTextInputClient() {
17 } 18 }
18 19
19 void DummyTextInputClient::SetCompositionText( 20 void DummyTextInputClient::SetCompositionText(
20 const CompositionText& composition) { 21 const CompositionText& composition) {
21 } 22 }
22 23
23 void DummyTextInputClient::ConfirmCompositionText() { 24 void DummyTextInputClient::ConfirmCompositionText() {
24 } 25 }
25 26
26 void DummyTextInputClient::ClearCompositionText() { 27 void DummyTextInputClient::ClearCompositionText() {
27 } 28 }
28 29
29 void DummyTextInputClient::InsertText(const base::string16& text) { 30 void DummyTextInputClient::InsertText(const base::string16& text) {
30 } 31 }
31 32
32 void DummyTextInputClient::InsertChar(const KeyEvent& event) {} 33 void DummyTextInputClient::InsertChar(const KeyEvent& event) {
34 ++insert_char_count_;
35 last_insert_char_ = event.GetCharacter();
36 }
33 37
34 TextInputType DummyTextInputClient::GetTextInputType() const { 38 TextInputType DummyTextInputClient::GetTextInputType() const {
35 return text_input_type_; 39 return text_input_type_;
36 } 40 }
37 41
38 TextInputMode DummyTextInputClient::GetTextInputMode() const { 42 TextInputMode DummyTextInputClient::GetTextInputMode() const {
39 return TEXT_INPUT_MODE_DEFAULT; 43 return TEXT_INPUT_MODE_DEFAULT;
40 } 44 }
41 45
42 int DummyTextInputClient::GetTextInputFlags() const { 46 int DummyTextInputClient::GetTextInputFlags() const {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 106 }
103 107
104 bool DummyTextInputClient::IsEditCommandEnabled(int command_id) { 108 bool DummyTextInputClient::IsEditCommandEnabled(int command_id) {
105 return false; 109 return false;
106 } 110 }
107 111
108 void DummyTextInputClient::SetEditCommandForNextKeyEvent(int command_id) { 112 void DummyTextInputClient::SetEditCommandForNextKeyEvent(int command_id) {
109 } 113 }
110 114
111 } // namespace ui 115 } // namespace ui
OLDNEW
« 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