Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Side by Side Diff: chrome/browser/spellchecker/spellcheck_platform.h

Issue 1602303002: [mac] Send the system spellchecker language to the renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file defines the interface that any platform-specific spellchecker 5 // This file defines the interface that any platform-specific spellchecker
6 // needs to implement in order to be used by the browser. 6 // needs to implement in order to be used by the browser.
7 7
8 #ifndef CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_H_ 8 #ifndef CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_H_
9 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_H_ 9 #define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_H_
10 10
(...skipping 13 matching lines...) Expand all
24 24
25 typedef base::Callback<void( 25 typedef base::Callback<void(
26 const std::vector<SpellCheckResult>& /* results */)> 26 const std::vector<SpellCheckResult>& /* results */)>
27 TextCheckCompleteCallback; 27 TextCheckCompleteCallback;
28 28
29 // Get the languages supported by the platform spellchecker and store them in 29 // Get the languages supported by the platform spellchecker and store them in
30 // |spellcheck_languages|. Note that they must be converted to 30 // |spellcheck_languages|. Note that they must be converted to
31 // Chromium style codes (en-US not en_US). See spellchecker.cc for a full list. 31 // Chromium style codes (en-US not en_US). See spellchecker.cc for a full list.
32 void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages); 32 void GetAvailableLanguages(std::vector<std::string>* spellcheck_languages);
33 33
34 // Returns the language used for spellchecking on the platform.
35 std::string GetSpellCheckerLanguage();
36
34 // Returns true if there is a platform-specific spellchecker that can be used. 37 // Returns true if there is a platform-specific spellchecker that can be used.
35 bool SpellCheckerAvailable(); 38 bool SpellCheckerAvailable();
36 39
37 // Returns true if the platform spellchecker has a spelling panel. 40 // Returns true if the platform spellchecker has a spelling panel.
38 bool SpellCheckerProvidesPanel(); 41 bool SpellCheckerProvidesPanel();
39 42
40 // Returns true if the platform spellchecker panel is visible. 43 // Returns true if the platform spellchecker panel is visible.
41 bool SpellingPanelVisible(); 44 bool SpellingPanelVisible();
42 45
43 // Shows the spelling panel if |show| is true and hides it if it is not. 46 // Shows the spelling panel if |show| is true and hides it if it is not.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 public: 106 public:
104 ScopedEnglishLanguageForTest(); 107 ScopedEnglishLanguageForTest();
105 ~ScopedEnglishLanguageForTest(); 108 ~ScopedEnglishLanguageForTest();
106 private: 109 private:
107 SpellcheckerStateInternal* state_; 110 SpellcheckerStateInternal* state_;
108 }; 111 };
109 112
110 } // namespace spellcheck_platform 113 } // namespace spellcheck_platform
111 114
112 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_H_ 115 #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_PLATFORM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698