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 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. 19 bool PlatformSupportsLanguage(const std::string& current_language) { 20 return false; 21 } 22 23 void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages) { 24 spellcheck_languages->clear(); 25 } 26 27 bool SpellCheckerProvidesPanel() { 28 return false; 29 } 30 31 bool SpellingPanelVisible() { 32 return false; 33 } 34 35 void ShowSpellingPanel(bool show) {} 36 37 void UpdateSpellingPanelWithMisspelledWord(const string16& word) {} 38 39 void Init() {} 40 41 void SetLanguage(const std::string& lang_to_set) {} 42 43 bool CheckSpelling(const string16& word_to_check, int tag) { 44 return false; 45 } 46 47 void FillSuggestionList(const string16& wrong_word, 48 std::vector<string16>* optional_suggestions) {} 49 50 void AddWord(const string16& word) {} 51 52 void RemoveWord(const string16& word) {} 53 54 int GetDocumentTag() { return 0; } 55 56 void IgnoreWord(const string16& word) {} 57 58 void CloseDocumentWithTag(int tag) {} 59 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