| Index: content/browser/android/text_suggestion_host_impl.cc
|
| diff --git a/content/browser/android/text_suggestion_host_impl.cc b/content/browser/android/text_suggestion_host_impl.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..722ed4fd5f2acb2e8ab49a801d2f3d1b3bd6a05c
|
| --- /dev/null
|
| +++ b/content/browser/android/text_suggestion_host_impl.cc
|
| @@ -0,0 +1,39 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "content/browser/android/text_suggestion_host_impl.h"
|
| +
|
| +#include "content/browser/android/ime_adapter_android.h"
|
| +#include "mojo/public/cpp/bindings/strong_binding.h"
|
| +
|
| +namespace content {
|
| +
|
| +TextSuggestionHostImpl::TextSuggestionHostImpl(
|
| + ImeAdapterAndroid* ime_adapter_android)
|
| + : ime_adapter_android_(ime_adapter_android) {}
|
| +
|
| +// static
|
| +void TextSuggestionHostImpl::Create(
|
| + ImeAdapterAndroid* ime_adapter_android,
|
| + const service_manager::BindSourceInfo& source_info,
|
| + blink::mojom::TextSuggestionHostRequest request) {
|
| + mojo::MakeStrongBinding(
|
| + base::MakeUnique<TextSuggestionHostImpl>(ime_adapter_android),
|
| + std::move(request));
|
| +}
|
| +
|
| +void TextSuggestionHostImpl::StartSpellCheckMenuTimer() {
|
| + ime_adapter_android_->StartSpellCheckMenuTimer();
|
| +}
|
| +
|
| +void TextSuggestionHostImpl::ShowSpellCheckSuggestionMenu(
|
| + double caret_x,
|
| + double caret_y,
|
| + const std::string& marked_text,
|
| + std::vector<blink::mojom::SpellCheckSuggestionPtr> suggestions) {
|
| + ime_adapter_android_->ShowSpellCheckSuggestionMenu(caret_x, caret_y,
|
| + marked_text, suggestions);
|
| +}
|
| +
|
| +} // namespace content
|
|
|