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

Unified Diff: chrome/renderer/spellchecker/platform_spelling_engine.cc

Issue 2198143002: Componentize spellcheck [3]: move renderer/ files to component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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
« no previous file with comments | « chrome/renderer/spellchecker/platform_spelling_engine.h ('k') | chrome/renderer/spellchecker/spellcheck.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/spellchecker/platform_spelling_engine.cc
diff --git a/chrome/renderer/spellchecker/platform_spelling_engine.cc b/chrome/renderer/spellchecker/platform_spelling_engine.cc
deleted file mode 100644
index 97a66aaa6b77edfeb9f57e6b883f550f00ab8509..0000000000000000000000000000000000000000
--- a/chrome/renderer/spellchecker/platform_spelling_engine.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/renderer/spellchecker/platform_spelling_engine.h"
-
-#include "components/spellcheck/common/spellcheck_messages.h"
-#include "content/public/renderer/render_thread.h"
-
-using content::RenderThread;
-
-SpellingEngine* CreateNativeSpellingEngine() {
- return new PlatformSpellingEngine();
-}
-
-void PlatformSpellingEngine::Init(base::File bdict_file) {
- DCHECK(!bdict_file.IsValid());
-}
-
-bool PlatformSpellingEngine::InitializeIfNeeded() {
- return false;
-}
-
-bool PlatformSpellingEngine::IsEnabled() {
- return true;
-}
-
-// Synchronously query against the platform's spellchecker.
-// TODO(groby): We might want async support here, too. Ideally,
-// all engines share a similar path for async requests.
-bool PlatformSpellingEngine::CheckSpelling(const base::string16& word_to_check,
- int tag) {
- bool word_correct = false;
- RenderThread::Get()->Send(new SpellCheckHostMsg_CheckSpelling(
- word_to_check, tag, &word_correct));
- return word_correct;
-}
-
-// Synchronously query against the platform's spellchecker.
-// TODO(groby): We might want async support here, too. Ideally,
-// all engines share a similar path for async requests.
-void PlatformSpellingEngine::FillSuggestionList(
- const base::string16& wrong_word,
- std::vector<base::string16>* optional_suggestions) {
- RenderThread::Get()->Send(new SpellCheckHostMsg_FillSuggestionList(
- wrong_word, optional_suggestions));
-}
« no previous file with comments | « chrome/renderer/spellchecker/platform_spelling_engine.h ('k') | chrome/renderer/spellchecker/spellcheck.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698