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 "content/browser/android/text_suggestion_host_mojo_impl_android.h" |
| 6 |
| 7 #include "content/browser/android/text_suggestion_host_android.h" |
| 8 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 9 |
| 10 namespace content { |
| 11 |
| 12 TextSuggestionHostMojoImplAndroid::TextSuggestionHostMojoImplAndroid( |
| 13 TextSuggestionHostAndroid* text_suggestion_host) |
| 14 : text_suggestion_host_(text_suggestion_host) {} |
| 15 |
| 16 // static |
| 17 void TextSuggestionHostMojoImplAndroid::Create( |
| 18 TextSuggestionHostAndroid* text_suggestion_host, |
| 19 const service_manager::BindSourceInfo& source_info, |
| 20 blink::mojom::TextSuggestionHostRequest request) { |
| 21 mojo::MakeStrongBinding( |
| 22 base::MakeUnique<TextSuggestionHostMojoImplAndroid>(text_suggestion_host), |
| 23 std::move(request)); |
| 24 } |
| 25 |
| 26 void TextSuggestionHostMojoImplAndroid::StartSpellCheckMenuTimer() { |
| 27 text_suggestion_host_->StartSpellCheckMenuTimer(); |
| 28 } |
| 29 |
| 30 void TextSuggestionHostMojoImplAndroid::ShowSpellCheckSuggestionMenu( |
| 31 double caret_x, |
| 32 double caret_y, |
| 33 const std::string& marked_text, |
| 34 std::vector<blink::mojom::SpellCheckSuggestionPtr> suggestions) { |
| 35 text_suggestion_host_->ShowSpellCheckSuggestionMenu(caret_x, caret_y, |
| 36 marked_text, suggestions); |
| 37 } |
| 38 |
| 39 } // namespace content |
OLD | NEW |