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 #ifndef TextSuggestionController_h | |
6 #define TextSuggestionController_h | |
7 | |
8 #include "core/CoreExport.h" | |
9 #include "platform/heap/Handle.h" | |
10 #include "public/platform/input_host.mojom-blink.h" | |
11 | |
12 namespace blink { | |
13 | |
14 class Document; | |
15 class LocalFrame; | |
16 | |
17 class CORE_EXPORT TextSuggestionController final | |
yosin_UTC9
2017/06/07 01:34:15
Could you add a class comment?
| |
18 : public GarbageCollectedFinalized<TextSuggestionController> { | |
19 WTF_MAKE_NONCOPYABLE(TextSuggestionController); | |
20 | |
21 public: | |
22 explicit TextSuggestionController(LocalFrame&); | |
23 | |
24 bool IsMenuOpen() const; | |
25 | |
26 void HandlePotentialMisspelledWordTap(); | |
27 | |
28 void ApplySpellCheckSuggestion(const WTF::String& suggestion); | |
29 void DeleteActiveSuggestionRange(); | |
30 void NewWordAddedToDictionary(const WTF::String& word); | |
31 void SpellCheckMenuTimeoutCallback(); | |
32 void SuggestionMenuClosed(); | |
33 | |
34 DECLARE_TRACE(); | |
35 | |
36 private: | |
37 Document& GetDocument() const; | |
38 bool IsAvailable() const; | |
39 | |
40 LocalFrame& GetFrame() const { | |
41 DCHECK(frame_); | |
42 return *frame_; | |
43 } | |
44 | |
45 void ReplaceActiveSuggestionRange(const String&); | |
46 | |
47 bool suggestion_menu_is_open_; | |
48 Member<LocalFrame> frame_; | |
49 mojom::blink::TextSuggestionHostPtr text_suggestion_host_; | |
50 }; | |
51 | |
52 } // namespace blink | |
53 | |
54 #endif // TextSuggestionController_h | |
OLD | NEW |