1 // Copyright 2015 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.
5 #include "chrome/browser/spellchecker/spellcheck_platform.h"
7 #include "base/callback.h"
8 #include "base/command_line.h"
9 #include "chrome/common/chrome_switches.h"
11 namespace spellcheck_platform
{
13 void GetAvailableLanguages(std::vector
<std::string
>* spellcheck_languages
) {
16 bool SpellCheckerAvailable() {
17 return base::CommandLine::ForCurrentProcess()->HasSwitch(
18 switches::kEnableAndroidSpellChecker
);
21 bool SpellCheckerProvidesPanel() {
25 bool SpellingPanelVisible() {
29 void ShowSpellingPanel(bool show
) {
32 void UpdateSpellingPanelWithMisspelledWord(const base::string16
& word
) {
35 bool PlatformSupportsLanguage(const std::string
& current_language
) {
39 void SetLanguage(const std::string
& lang_to_set
) {
42 bool CheckSpelling(const base::string16
& word_to_check
, int tag
) {
46 void FillSuggestionList(const base::string16
& wrong_word
,
47 std::vector
<base::string16
>* optional_suggestions
) {
50 void AddWord(const base::string16
& word
) {
53 void RemoveWord(const base::string16
& word
) {
56 int GetDocumentTag() {
60 void IgnoreWord(const base::string16
& word
) {
63 void CloseDocumentWithTag(int tag
) {
66 void RequestTextCheck(int document_tag
,
67 const base::string16
& text
,
68 TextCheckCompleteCallback callback
) {
72 } // namespace spellcheck_platform