summaryrefslogtreecommitdiffstats
path: root/chrome/browser/spellchecker_win.cc
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-30 15:09:05 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-30 15:09:05 +0000
commit9b75b5b69a63c9a7167badc5ca33e9910d4e390a (patch)
treef4336ee158e22d709c07ba92d0e10f2ae6922836 /chrome/browser/spellchecker_win.cc
parentde9904623b5b91688a98ee987ee6ccfe2f584085 (diff)
downloadchromium_src-9b75b5b69a63c9a7167badc5ca33e9910d4e390a.zip
chromium_src-9b75b5b69a63c9a7167badc5ca33e9910d4e390a.tar.gz
chromium_src-9b75b5b69a63c9a7167badc5ca33e9910d4e390a.tar.bz2
Enable support for the Mac OS X spellchecking service in chromium.
spellchecker_platform_engine.h provides a basic interface for platform specific spellcheckers to follow. spellchecker_mac.mm implements these functions for the OS X spellchecking service. spellchecker_win.cc and spellchecker_linux.cc provide a space for future developments on these platforms. spellchecker_common.h contains a few shared variables and typedefs that are useful across all spellchecking code. spellchecker.cc has been modified to call the SpellCheckerPlatform::SpellCheckerAvailable() and use either hunspell or the platform spellchecker based on that call. Many new test cases have been added to one of the unit tests as well. chrome.gyp has been edited to reflect the added files. patch from pwicks86@gmail.com (paul wicks) BUG=13206 TEST=spellchecking works in web pages git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19585 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellchecker_win.cc')
-rw-r--r--chrome/browser/spellchecker_win.cc43
1 files changed, 43 insertions, 0 deletions
diff --git a/chrome/browser/spellchecker_win.cc b/chrome/browser/spellchecker_win.cc
new file mode 100644
index 0000000..2632ee6
--- /dev/null
+++ b/chrome/browser/spellchecker_win.cc
@@ -0,0 +1,43 @@
+// Copyright (c) 2009 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.
+
+// If windows ever gains a platform specific spellchecker, it will be
+// implemented here.
+
+#include "chrome/browser/spellchecker_common.h"
+
+namespace SpellCheckerPlatform {
+
+bool SpellCheckerAvailable() {
+ // No current version of Windows (as of Summer 2009) has a common spellchecker
+ // so we'll return false here.
+ return false;
+}
+
+// The following methods are just stubs to keep the linker happy.
+bool PlatformSupportsLanguage(const Language& current_language) {
+ return false;
+}
+
+void Init() {
+}
+
+void SetLanguage(const Language& lang_to_set) {
+}
+
+bool CheckSpelling(const std::string& word_to_check) {
+ return false;
+}
+
+void FillSuggestionList(const std::string& wrong_word,
+ std::vector<std::wstring>* optional_suggestions) {
+}
+
+void AddWord(const std::wstring& word) {
+}
+
+void RemoveWord(const std::wstring& word) {
+}
+
+} // namespace SpellCheckerPlatform