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

Side by Side Diff: chrome/browser/ui/views/ime_driver/remote_text_input_client.cc

Issue 2557493002: IME for Mus: Use ui::InputMethodChromeOS to provide logic for ime driver. (Closed)
Patch Set: . Created 4 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/views/ime_driver/remote_text_input_client.h"
6
7 #include "base/strings/utf_string_conversions.h"
8
9 RemoteTextInputClient::RemoteTextInputClient(
10 ui::mojom::TextInputClientPtr remote_client)
11 : remote_client_(std::move(remote_client)) {}
12
13 RemoteTextInputClient::~RemoteTextInputClient() {}
14
15 void RemoteTextInputClient::SetCompositionText(
16 const ui::CompositionText& composition) {
17 remote_client_->SetCompositionText(composition);
18 }
19
20 void RemoteTextInputClient::ConfirmCompositionText() {
21 remote_client_->ConfirmCompositionText();
22 }
23
24 void RemoteTextInputClient::ClearCompositionText() {
25 remote_client_->ClearCompositionText();
26 }
27
28 void RemoteTextInputClient::InsertText(const base::string16& text) {
29 remote_client_->InsertText(base::UTF16ToUTF8(text));
30 }
31
32 void RemoteTextInputClient::InsertChar(const ui::KeyEvent& event) {
33 remote_client_->InsertChar(ui::Event::Clone(event));
34 }
35
36 ui::TextInputType RemoteTextInputClient::GetTextInputType() const {
37 // TODO(moshayedi): crbug.com/631527.
38 NOTIMPLEMENTED();
39 return ui::TEXT_INPUT_TYPE_TEXT;
40 }
41
42 ui::TextInputMode RemoteTextInputClient::GetTextInputMode() const {
43 // TODO(moshayedi): crbug.com/631527.
44 NOTIMPLEMENTED();
45 return ui::TEXT_INPUT_MODE_DEFAULT;
46 }
47
48 base::i18n::TextDirection RemoteTextInputClient::GetTextDirection() const {
49 // TODO(moshayedi): crbug.com/631527.
50 NOTIMPLEMENTED();
sky 2016/12/12 02:16:21 Are these going to be spammy? Can you define NOTIM
Hadi 2016/12/12 16:04:58 Done.
51 return base::i18n::UNKNOWN_DIRECTION;
52 }
53
54 int RemoteTextInputClient::GetTextInputFlags() const {
55 // TODO(moshayedi): crbug.com/631527.
56 NOTIMPLEMENTED();
57 return 0;
58 }
59
60 bool RemoteTextInputClient::CanComposeInline() const {
61 // If we return false here, ui::InputMethodChromeOS will try to create a
62 // composition window. But here we are at IMEDriver, and composition
63 // window shouldn't be created by IMEDriver.
64 return true;
65 }
66
67 gfx::Rect RemoteTextInputClient::GetCaretBounds() const {
68 // TODO(moshayedi): crbug.com/631527.
69 NOTIMPLEMENTED();
70 return gfx::Rect();
71 }
72
73 bool RemoteTextInputClient::GetCompositionCharacterBounds(
74 uint32_t index,
75 gfx::Rect* rect) const {
76 // TODO(moshayedi): crbug.com/631527.
77 NOTIMPLEMENTED();
78 return false;
79 }
80
81 bool RemoteTextInputClient::HasCompositionText() const {
82 // TODO(moshayedi): crbug.com/631527.
83 NOTIMPLEMENTED();
84 return false;
85 }
86
87 bool RemoteTextInputClient::GetTextRange(gfx::Range* range) const {
88 // TODO(moshayedi): crbug.com/631527.
89 NOTIMPLEMENTED();
90 return false;
91 }
92
93 bool RemoteTextInputClient::GetCompositionTextRange(gfx::Range* range) const {
94 // TODO(moshayedi): crbug.com/631527.
95 NOTIMPLEMENTED();
96 return false;
97 }
98
99 bool RemoteTextInputClient::GetSelectionRange(gfx::Range* range) const {
100 // TODO(moshayedi): crbug.com/631527.
101 NOTIMPLEMENTED();
102 return false;
103 }
104
105 bool RemoteTextInputClient::SetSelectionRange(const gfx::Range& range) {
106 // TODO(moshayedi): crbug.com/631527.
107 NOTIMPLEMENTED();
108 return false;
109 }
110
111 bool RemoteTextInputClient::DeleteRange(const gfx::Range& range) {
112 // TODO(moshayedi): crbug.com/631527.
113 NOTIMPLEMENTED();
114 return false;
115 }
116
117 bool RemoteTextInputClient::GetTextFromRange(const gfx::Range& range,
118 base::string16* text) const {
119 // TODO(moshayedi): crbug.com/631527.
120 NOTIMPLEMENTED();
121 return false;
122 }
123
124 void RemoteTextInputClient::OnInputMethodChanged() {
125 // TODO(moshayedi): crbug.com/631527.
126 NOTIMPLEMENTED();
127 }
128
129 bool RemoteTextInputClient::ChangeTextDirectionAndLayoutAlignment(
130 base::i18n::TextDirection direction) {
131 // TODO(moshayedi): crbug.com/631527.
132 NOTIMPLEMENTED();
133 return false;
134 }
135
136 void RemoteTextInputClient::ExtendSelectionAndDelete(size_t before,
137 size_t after) {
138 // TODO(moshayedi): crbug.com/631527.
139 NOTIMPLEMENTED();
140 }
141
142 void RemoteTextInputClient::EnsureCaretInRect(const gfx::Rect& rect) {
143 // TODO(moshayedi): crbug.com/631527.
144 NOTIMPLEMENTED();
145 }
146
147 bool RemoteTextInputClient::IsTextEditCommandEnabled(
148 ui::TextEditCommand command) const {
149 // TODO(moshayedi): crbug.com/631527.
150 NOTIMPLEMENTED();
151 return false;
152 }
153
154 void RemoteTextInputClient::SetTextEditCommandForNextKeyEvent(
155 ui::TextEditCommand command) {
156 // TODO(moshayedi): crbug.com/631527.
157 NOTIMPLEMENTED();
158 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698