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

Side by Side Diff: third_party/WebKit/Source/core/editing/suggestion/TextSuggestionBackendImpl.cpp

Issue 2931443003: Add support for Android spellcheck menu in Chrome/WebViews (Closed)
Patch Set: Remove some unused fields in SuggestionsPopupWindow, don't hold reference to mutable array passed in Created 3 years, 6 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 "core/editing/suggestion/TextSuggestionBackendImpl.h"
6
7 #include "core/editing/suggestion/TextSuggestionController.h"
8 #include "core/frame/LocalFrame.h"
9 #include "mojo/public/cpp/bindings/strong_binding.h"
10
11 namespace blink {
12
13 TextSuggestionBackendImpl::TextSuggestionBackendImpl(LocalFrame& frame)
14 : frame_(frame) {}
15
16 // static
17 void TextSuggestionBackendImpl::Create(
18 LocalFrame* frame,
19 mojom::blink::TextSuggestionBackendRequest request) {
20 mojo::MakeStrongBinding(WTF::MakeUnique<TextSuggestionBackendImpl>(*frame),
21 std::move(request));
22 }
23
24 void TextSuggestionBackendImpl::ApplySpellCheckSuggestion(
25 const WTF::String& suggestion) {
26 frame_->GetTextSuggestionController().ApplySpellCheckSuggestion(suggestion);
27 }
28
29 void TextSuggestionBackendImpl::DeleteActiveSuggestionRange() {
30 frame_->GetTextSuggestionController().DeleteActiveSuggestionRange();
31 }
32
33 void TextSuggestionBackendImpl::NewWordAddedToDictionary(
34 const WTF::String& word) {
35 frame_->GetTextSuggestionController().NewWordAddedToDictionary(word);
36 }
37
38 void TextSuggestionBackendImpl::SpellCheckMenuTimeoutCallback() {
39 frame_->GetTextSuggestionController().SpellCheckMenuTimeoutCallback();
40 }
41
42 void TextSuggestionBackendImpl::SuggestionMenuClosed() {
43 frame_->GetTextSuggestionController().SuggestionMenuClosed();
44 }
45
46 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698