OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 "core/editing/TextSuggestionBackendImplAndroid.h" |
| 6 |
| 7 #include "core/editing/TextSuggestionController.h" |
| 8 #include "core/frame/LocalFrame.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 TextSuggestionBackendImplAndroid::TextSuggestionBackendImplAndroid(LocalFrame& f
rame) |
| 13 : m_frame(frame) {} |
| 14 |
| 15 // static |
| 16 void TextSuggestionBackendImplAndroid::create( |
| 17 LocalFrame* frame, |
| 18 mojom::blink::TextSuggestionBackendRequest request) { |
| 19 mojo::MakeStrongBinding(WTF::makeUnique<TextSuggestionBackendImplAndroid>(*fra
me), |
| 20 std::move(request)); |
| 21 } |
| 22 |
| 23 void TextSuggestionBackendImplAndroid::ApplySuggestionReplacement( |
| 24 int64_t document_marker_hash, |
| 25 int32_t suggestion_index) { |
| 26 m_frame->textSuggestionController().applySuggestionReplacement( |
| 27 document_marker_hash, suggestion_index); |
| 28 } |
| 29 |
| 30 void TextSuggestionBackendImplAndroid::DeleteSuggestionHighlight() { |
| 31 m_frame->textSuggestionController().deleteSuggestionHighlight(); |
| 32 } |
| 33 |
| 34 void TextSuggestionBackendImplAndroid::SuggestionMenuClosed() { |
| 35 m_frame->textSuggestionController().suggestionMenuClosed(); |
| 36 } |
| 37 |
| 38 } // namespace blink |
OLD | NEW |