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_bridge_impl.h" | 5 #include "components/arc/ime/arc_ime_bridge_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 } | 148 } |
149 | 149 |
150 void ArcImeBridgeImpl::OnCancelComposition() { | 150 void ArcImeBridgeImpl::OnCancelComposition() { |
151 delegate_->OnCancelComposition(); | 151 delegate_->OnCancelComposition(); |
152 } | 152 } |
153 | 153 |
154 void ArcImeBridgeImpl::ShowImeIfNeeded() { | 154 void ArcImeBridgeImpl::ShowImeIfNeeded() { |
155 delegate_->ShowImeIfNeeded(); | 155 delegate_->ShowImeIfNeeded(); |
156 } | 156 } |
157 | 157 |
| 158 void ArcImeBridgeImpl::OnCursorRectChangedWithSurroundingText( |
| 159 mojom::CursorRectPtr rect, |
| 160 mojom::TextRangePtr text_range, |
| 161 const std::string& text_in_range, |
| 162 mojom::TextRangePtr selection_range) { |
| 163 delegate_->OnCursorRectChangedWithSurroundingText( |
| 164 gfx::Rect(rect->left, rect->top, rect->right - rect->left, |
| 165 rect->bottom - rect->top), |
| 166 gfx::Range(text_range->start, text_range->end), |
| 167 base::UTF8ToUTF16(text_in_range), |
| 168 gfx::Range(selection_range->start, selection_range->end)); |
| 169 } |
| 170 |
158 } // namespace arc | 171 } // namespace arc |
OLD | NEW |