| Index: chrome/renderer/spellchecker/spellcheck.cc
|
| diff --git a/chrome/renderer/spellchecker/spellcheck.cc b/chrome/renderer/spellchecker/spellcheck.cc
|
| index d548285588111b220e2e805dc3465a43555951d8..85d5fd0ac03e151dfd2c97b34b0952d2ee545f3a 100644
|
| --- a/chrome/renderer/spellchecker/spellcheck.cc
|
| +++ b/chrome/renderer/spellchecker/spellcheck.cc
|
| @@ -62,29 +62,6 @@ bool UpdateSpellcheckEnabled::Visit(content::RenderView* render_view) {
|
| return true;
|
| }
|
|
|
| -class DocumentMarkersCollector : public content::RenderViewVisitor {
|
| - public:
|
| - DocumentMarkersCollector() {}
|
| - ~DocumentMarkersCollector() override {}
|
| - const std::vector<uint32_t>& markers() const { return markers_; }
|
| - bool Visit(content::RenderView* render_view) override;
|
| -
|
| - private:
|
| - std::vector<uint32_t> markers_;
|
| - DISALLOW_COPY_AND_ASSIGN(DocumentMarkersCollector);
|
| -};
|
| -
|
| -bool DocumentMarkersCollector::Visit(content::RenderView* render_view) {
|
| - if (!render_view || !render_view->GetWebView())
|
| - return true;
|
| - WebVector<uint32_t> markers;
|
| - render_view->GetWebView()->spellingMarkers(&markers);
|
| - for (size_t i = 0; i < markers.size(); ++i)
|
| - markers_.push_back(markers[i]);
|
| - // Visit all render views.
|
| - return true;
|
| -}
|
| -
|
| class DocumentMarkersRemover : public content::RenderViewVisitor {
|
| public:
|
| explicit DocumentMarkersRemover(const std::set<std::string>& words);
|
| @@ -211,8 +188,6 @@ bool SpellCheck::OnControlMessageReceived(const IPC::Message& message) {
|
| IPC_MESSAGE_HANDLER(SpellCheckMsg_CustomDictionaryChanged,
|
| OnCustomDictionaryChanged)
|
| IPC_MESSAGE_HANDLER(SpellCheckMsg_EnableSpellCheck, OnEnableSpellCheck)
|
| - IPC_MESSAGE_HANDLER(SpellCheckMsg_RequestDocumentMarkers,
|
| - OnRequestDocumentMarkers)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
|
|
| @@ -251,13 +226,6 @@ void SpellCheck::OnEnableSpellCheck(bool enable) {
|
| content::RenderView::ForEach(&updater);
|
| }
|
|
|
| -void SpellCheck::OnRequestDocumentMarkers() {
|
| - DocumentMarkersCollector collector;
|
| - content::RenderView::ForEach(&collector);
|
| - content::RenderThread::Get()->Send(
|
| - new SpellCheckHostMsg_RespondDocumentMarkers(collector.markers()));
|
| -}
|
| -
|
| // TODO(groby): Make sure we always have a spelling engine, even before
|
| // AddSpellcheckLanguage() is called.
|
| void SpellCheck::AddSpellcheckLanguage(base::File file,
|
| @@ -530,7 +498,7 @@ void SpellCheck::CreateTextCheckingResults(
|
| results.push_back(WebTextCheckingResult(
|
| static_cast<WebTextDecorationType>(decoration),
|
| line_offset + spellcheck_result.location, spellcheck_result.length,
|
| - replacement, spellcheck_result.hash));
|
| + replacement));
|
| }
|
|
|
| textcheck_results->assign(results);
|
|
|