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

Unified Diff: components/spellcheck/renderer/spellcheck_provider.h

Issue 2791753003: Split WebTextCheckClient off WebSpellCheckClient (Closed)
Patch Set: Add TODOs for class renaming Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: components/spellcheck/renderer/spellcheck_provider.h
diff --git a/components/spellcheck/renderer/spellcheck_provider.h b/components/spellcheck/renderer/spellcheck_provider.h
index 24fa02197bc8141c08a8b7e74715b6cea5e27dc4..68910a3e06f6ea09c7b54111b01b82f058a3589f 100644
--- a/components/spellcheck/renderer/spellcheck_provider.h
+++ b/components/spellcheck/renderer/spellcheck_provider.h
@@ -16,23 +16,26 @@
#include "content/public/renderer/render_view_observer.h"
#include "content/public/renderer/render_view_observer_tracker.h"
#include "third_party/WebKit/public/web/WebSpellCheckClient.h"
+#include "third_party/WebKit/public/web/WebTextCheckClient.h"
class RenderView;
class SpellCheck;
struct SpellCheckResult;
namespace blink {
-class WebString;
class WebTextCheckingCompletion;
struct WebTextCheckingResult;
}
// This class deals with invoking browser-side spellcheck mechanism
// which is done asynchronously.
+// TODO(xiaochengh): Split this class to implement WebSpellCheckClient and
+// WebTextCheckClient separately.
class SpellCheckProvider
: public content::RenderViewObserver,
public content::RenderViewObserverTracker<SpellCheckProvider>,
- public blink::WebSpellCheckClient {
+ public blink::WebSpellCheckClient,
+ public blink::WebTextCheckClient {
public:
using WebTextCheckCompletions = IDMap<blink::WebTextCheckingCompletion*>;
@@ -74,18 +77,18 @@ class SpellCheckProvider
// RenderViewObserver implementation.
void OnDestruct() override;
- // blink::WebSpellCheckClient implementation.
+ // blink::WebTextCheckClient implementation.
void checkSpelling(
const blink::WebString& text,
int& offset,
int& length,
blink::WebVector<blink::WebString>* optional_suggestions) override;
-
void requestCheckingOfText(
const blink::WebString& text,
blink::WebTextCheckingCompletion* completion) override;
-
void cancelAllPendingRequests() override;
+
+ // blink::WebSpellCheckClient implementation.
void showSpellingUI(bool show) override;
bool isShowingSpellingUI() override;
void updateSpellingUIWithMisspelledWord(

Powered by Google App Engine
This is Rietveld 408576698