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

Unified Diff: chrome/browser/ui/webui/chromeos/login/l10n_util.h

Issue 417103003: Retrieve the list of keyboard layouts for public sessions async (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use blocking pool instead of FILE thread. Created 6 years, 5 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
Index: chrome/browser/ui/webui/chromeos/login/l10n_util.h
diff --git a/chrome/browser/ui/webui/chromeos/login/l10n_util.h b/chrome/browser/ui/webui/chromeos/login/l10n_util.h
index 2f9fcc843fb070f9459c3ecc4006b41f778be1dc..aa9f4fb9a946ddfc75b39f5863cf413a2ecb66e2 100644
--- a/chrome/browser/ui/webui/chromeos/login/l10n_util.h
+++ b/chrome/browser/ui/webui/chromeos/login/l10n_util.h
@@ -8,9 +8,11 @@
#include <string>
#include <vector>
+#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
namespace base {
+class DictionaryValue;
class ListValue;
}
@@ -55,15 +57,22 @@ scoped_ptr<base::ListValue> GetLoginKeyboardLayouts(
const std::string& locale,
const std::string& selected);
-// Return a list of keyboard layouts that can be used for |locale|. Each list
-// entry is a dictionary that contains data such as an ID and a display name.
-// The list will consist of the device's hardware layouts, followed by a divider
-// and locale-specific keyboard layouts, if any. All layouts supported for
-// |locale| are returned, including those that produce non-Latin characters by
-// default.
-scoped_ptr<base::ListValue> GetKeyboardLayoutsForLocale(
+// Invokes |callback| with a list of keyboard layouts that can be used for
+// |locale|. Each list entry is a dictionary that contains data such as an ID
+// and a display name. The list will consist of the device's hardware layouts,
+// followed by a divider and locale-specific keyboard layouts, if any. All
+// layouts supported for |locale| are returned, including those that produce
+// non-Latin characters by default.
+typedef base::Callback<void(scoped_ptr<base::ListValue>)>
+ GetKeyboardLayoutsForLocaleCallback;
+void GetKeyboardLayoutsForLocale(
+ const GetKeyboardLayoutsForLocaleCallback& callback,
const std::string& locale);
+// Returns the current keyboard layout, expressed as a dictionary that contains
+// data such as an ID and a display name.
+scoped_ptr<base::DictionaryValue> GetCurrentKeyboardLayout();
+
} // namespace chromeos
#endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_L10N_UTIL_H_
« no previous file with comments | « chrome/browser/chromeos/login/screens/user_selection_screen.cc ('k') | chrome/browser/ui/webui/chromeos/login/l10n_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698