Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: content/browser/android/text_suggestion_host_mojo_impl_android.cc

Issue 2931443003: Add support for Android spellcheck menu in Chrome/WebViews (Closed)
Patch Set: Simplify Mojo binding based on rockot@'s advice Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 blink::mojom::TextSuggestionHostRequest request) {
20 mojo::MakeStrongBinding(
21 base::MakeUnique<TextSuggestionHostMojoImplAndroid>(text_suggestion_host),
22 std::move(request));
23 }
24
25 void TextSuggestionHostMojoImplAndroid::StartSpellCheckMenuTimer() {
26 text_suggestion_host_->StartSpellCheckMenuTimer();
27 }
28
29 void TextSuggestionHostMojoImplAndroid::ShowSpellCheckSuggestionMenu(
30 double caret_x,
31 double caret_y,
32 const std::string& marked_text,
33 std::vector<blink::mojom::SpellCheckSuggestionPtr> suggestions) {
34 text_suggestion_host_->ShowSpellCheckSuggestionMenu(caret_x, caret_y,
35 marked_text, suggestions);
36 }
37
38 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698