summaryrefslogtreecommitdiffstats
path: root/chrome/browser/spellchecker_common.h
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_common.h
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_common.h')
-rw-r--r--chrome/browser/spellchecker_common.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/chrome/browser/spellchecker_common.h b/chrome/browser/spellchecker_common.h
new file mode 100644
index 0000000..a64b724
--- /dev/null
+++ b/chrome/browser/spellchecker_common.h
@@ -0,0 +1,22 @@
+// 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.
+
+#ifndef CHROME_BROWSER_SPELLCHECKER_COMMON_H_
+#define CHROME_BROWSER_SPELLCHECKER_COMMON_H_
+
+#include <string>
+#include <vector>
+
+// Some constants and typedefs that are common to all spellchecker
+// files/classes/backends/platforms/whatever.
+
+typedef std::string Language;
+typedef std::vector<Language> Languages;
+
+static const int kMaxSuggestions = 5; // Max number of dictionary suggestions.
+
+static const int kMaxAutoCorrectWordSize = 8;
+
+#endif // CHROME_BROWSER_SPELLCHECKER_COMMON_H_
+