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

Side by Side Diff: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h

Issue 2978823002: [SelectMiss...Async #2] Change ContextMenuClient::SelectMisspellingAsync() to return pair of strings (Closed)
Patch Set: 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
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void MarkAndReplaceFor(SpellCheckRequest*, const Vector<TextCheckingResult>&); 70 void MarkAndReplaceFor(SpellCheckRequest*, const Vector<TextCheckingResult>&);
71 void AdvanceToNextMisspelling(bool start_before_selection); 71 void AdvanceToNextMisspelling(bool start_before_selection);
72 void ShowSpellingGuessPanel(); 72 void ShowSpellingGuessPanel();
73 void DidBeginEditing(Element*); 73 void DidBeginEditing(Element*);
74 void MarkMisspellingsForMovingParagraphs(const VisibleSelection&); 74 void MarkMisspellingsForMovingParagraphs(const VisibleSelection&);
75 void RespondToChangedContents(); 75 void RespondToChangedContents();
76 void RespondToChangedSelection(const Position& old_selection_start, 76 void RespondToChangedSelection(const Position& old_selection_start,
77 FrameSelection::SetSelectionOptions); 77 FrameSelection::SetSelectionOptions);
78 Optional<std::pair<Node*, SpellCheckMarker*>> 78 Optional<std::pair<Node*, SpellCheckMarker*>>
79 GetSpellCheckMarkerTouchingSelection(); 79 GetSpellCheckMarkerTouchingSelection();
80 String SelectMisspellingAsync(String& description); 80 // The first String returned in the pair is the selected text
81 // The second String is the marker's description
82 Optional<std::pair<String, String>> SelectMisspellingAsync();
81 void ReplaceMisspelledRange(const String&); 83 void ReplaceMisspelledRange(const String&);
82 void RemoveSpellingMarkers(); 84 void RemoveSpellingMarkers();
83 void RemoveSpellingMarkersUnderWords(const Vector<String>& words); 85 void RemoveSpellingMarkersUnderWords(const Vector<String>& words);
84 enum class ElementsType { kAll, kOnlyNonEditable }; 86 enum class ElementsType { kAll, kOnlyNonEditable };
85 void RemoveSpellingAndGrammarMarkers(const HTMLElement&, 87 void RemoveSpellingAndGrammarMarkers(const HTMLElement&,
86 ElementsType = ElementsType::kAll); 88 ElementsType = ElementsType::kAll);
87 void SpellCheckAfterBlur(); 89 void SpellCheckAfterBlur();
88 90
89 void DidEndEditingOnTextField(Element*); 91 void DidEndEditingOnTextField(Element*);
90 bool SelectionStartHasMarkerFor(DocumentMarker::MarkerType, 92 bool SelectionStartHasMarkerFor(DocumentMarker::MarkerType,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 142
141 Member<LocalFrame> frame_; 143 Member<LocalFrame> frame_;
142 144
143 const Member<SpellCheckRequester> spell_check_requester_; 145 const Member<SpellCheckRequester> spell_check_requester_;
144 const Member<IdleSpellCheckCallback> idle_spell_check_callback_; 146 const Member<IdleSpellCheckCallback> idle_spell_check_callback_;
145 }; 147 };
146 148
147 } // namespace blink 149 } // namespace blink
148 150
149 #endif // SpellChecker_h 151 #endif // SpellChecker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698