• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // If linux ever gains a platform specific spellchecker, it will be
6 // implemented here.
7 
8 #include "spellchecker_platform_engine.h"
9 
10 namespace SpellCheckerPlatform {
11 
SpellCheckerAvailable()12 bool SpellCheckerAvailable() {
13   // As of Summer 2009, there is no commonly accepted platform spellchecker
14   // for Linux, so we'll return false here.
15   return false;
16 }
17 
18 // The following methods are just stubs to keep the linker happy.
PlatformSupportsLanguage(const std::string & current_language)19 bool PlatformSupportsLanguage(const std::string& current_language) {
20   return false;
21 }
22 
GetAvailableLanguages(std::vector<std::string> * spellcheck_languages)23 void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages) {
24   spellcheck_languages->clear();
25 }
26 
SpellCheckerProvidesPanel()27 bool SpellCheckerProvidesPanel() {
28   return false;
29 }
30 
SpellingPanelVisible()31 bool SpellingPanelVisible() {
32   return false;
33 }
34 
ShowSpellingPanel(bool show)35 void ShowSpellingPanel(bool show) {}
36 
UpdateSpellingPanelWithMisspelledWord(const string16 & word)37 void UpdateSpellingPanelWithMisspelledWord(const string16& word) {}
38 
Init()39 void Init() {}
40 
SetLanguage(const std::string & lang_to_set)41 void SetLanguage(const std::string& lang_to_set) {}
42 
CheckSpelling(const string16 & word_to_check,int tag)43 bool CheckSpelling(const string16& word_to_check, int tag) {
44   return false;
45 }
46 
FillSuggestionList(const string16 & wrong_word,std::vector<string16> * optional_suggestions)47 void FillSuggestionList(const string16& wrong_word,
48                         std::vector<string16>* optional_suggestions) {}
49 
AddWord(const string16 & word)50 void AddWord(const string16& word) {}
51 
RemoveWord(const string16 & word)52 void RemoveWord(const string16& word) {}
53 
GetDocumentTag()54 int GetDocumentTag() { return 0; }
55 
IgnoreWord(const string16 & word)56 void IgnoreWord(const string16& word) {}
57 
CloseDocumentWithTag(int tag)58 void CloseDocumentWithTag(int tag) {}
59 
RequestTextCheck(int route_id,int identifier,int document_tag,const string16 & text,BrowserMessageFilter * destination)60 void RequestTextCheck(int route_id,
61                       int identifier,
62                       int document_tag,
63                       const string16& text,
64                       BrowserMessageFilter* destination) {}
65 
66 }  // namespace SpellCheckerPlatform
67