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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
266 if (!is_control_char && !ui::IsSystemKeyModifier(event.flags())) { | 266 if (!is_control_char && !ui::IsSystemKeyModifier(event.flags())) { |
267 has_composition_text_ = false; | 267 has_composition_text_ = false; |
268 ime_bridge_->SendInsertText(base::string16(1, event.GetText())); | 268 ime_bridge_->SendInsertText(base::string16(1, event.GetText())); |
269 } | 269 } |
270 } | 270 } |
271 | 271 |
272 ui::TextInputType ArcImeService::GetTextInputType() const { | 272 ui::TextInputType ArcImeService::GetTextInputType() const { |
273 return ime_type_; | 273 return ime_type_; |
274 } | 274 } |
275 | 275 |
276 float ArcImeService::GetScaleFactor() const { | |
277 return 1.0f; | |
Shu Chen
2016/12/22 01:12:23
There might be a TODO for this.
| |
278 } | |
279 | |
276 gfx::Rect ArcImeService::GetCaretBounds() const { | 280 gfx::Rect ArcImeService::GetCaretBounds() const { |
277 if (focused_arc_window_.windows().empty()) | 281 if (focused_arc_window_.windows().empty()) |
278 return gfx::Rect(); | 282 return gfx::Rect(); |
279 aura::Window* window = focused_arc_window_.windows().front(); | 283 aura::Window* window = focused_arc_window_.windows().front(); |
280 | 284 |
281 // |cursor_rect_| holds the rectangle reported from ARC apps, in the "screen | 285 // |cursor_rect_| holds the rectangle reported from ARC apps, in the "screen |
282 // coordinates" in ARC, counted by physical pixels. | 286 // coordinates" in ARC, counted by physical pixels. |
283 // Chrome OS input methods expect the coordinates in Chrome OS screen, within | 287 // Chrome OS input methods expect the coordinates in Chrome OS screen, within |
284 // device independent pixels. Two factors are involved for the conversion. | 288 // device independent pixels. Two factors are involved for the conversion. |
285 | 289 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
350 base::i18n::TextDirection direction) { | 354 base::i18n::TextDirection direction) { |
351 return false; | 355 return false; |
352 } | 356 } |
353 | 357 |
354 bool ArcImeService::IsTextEditCommandEnabled( | 358 bool ArcImeService::IsTextEditCommandEnabled( |
355 ui::TextEditCommand command) const { | 359 ui::TextEditCommand command) const { |
356 return false; | 360 return false; |
357 } | 361 } |
358 | 362 |
359 } // namespace arc | 363 } // namespace arc |
OLD | NEW |