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

Unified Diff: chrome/browser/chromeos/language_library.h

Issue 542108: Add GetSupportedLanguages(), ActiveLanguage(), and DeactivateLanguage(). (Closed)
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/language_library.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/language_library.h
diff --git a/chrome/browser/chromeos/language_library.h b/chrome/browser/chromeos/language_library.h
index e79d1595ee45fa5e4d98f75aebfaf835e0668f27..88c197c9b6030376d69f977ff62e5c1b676466f2 100644
--- a/chrome/browser/chromeos/language_library.h
+++ b/chrome/browser/chromeos/language_library.h
@@ -35,11 +35,18 @@ class LanguageLibrary {
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
- // Returns the list of IMEs and keyboard layouts we can select. If the cros
- // library is not found or IBus/DBus daemon is not alive, this function
- // returns a fallback language list (and never returns NULL).
+ // Returns the list of IMEs and keyboard layouts we can select
+ // (i.e. active). If the cros library is not found or IBus/DBus daemon
+ // is not alive, this function returns a fallback language list (and
+ // never returns NULL).
InputLanguageList* GetLanguages();
+ // Returns the list of IMEs and keyboard layouts we support, including
+ // ones not active. If the cros library is not found or IBus/DBus
+ // daemon is not alive, this function returns a fallback language list
+ // (and never returns NULL).
+ InputLanguageList* GetSupportedLanguages();
+
// Changes the current IME engine to |id| and enable IME (when |category|
// is LANGUAGE_CATEGORY_IME). Changes the current XKB layout to |id| and
// disable IME (when |category| is LANGUAGE_CATEGORY_XKB). |id| is a unique
@@ -47,6 +54,14 @@ class LanguageLibrary {
// in src third_party/cros/ for details.
void ChangeLanguage(LanguageCategory category, const std::string& id);
+ // Activates the language specified by |category| and |id|. Returns true
+ // on success.
+ bool ActivateLanguage(LanguageCategory category, const std::string& id);
+
+ // Dectivates the language specified by |category| and |id|. Returns
+ // true on success.
+ bool DeactivateLanguage(LanguageCategory category, const std::string& id);
+
const InputLanguage& current_language() const {
return current_language_;
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/language_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698