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

Unified Diff: ui/base/ime/chromeos/ime_keyboard.h

Issue 2925353002: Implement sync of keyboard layout between Ozone and Wayland clients (Closed)
Patch Set: Address final comments Created 3 years, 6 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: ui/base/ime/chromeos/ime_keyboard.h
diff --git a/ui/base/ime/chromeos/ime_keyboard.h b/ui/base/ime/chromeos/ime_keyboard.h
index 80615bb6c8b1b69137d4be642caf92c71d3ce029..251d3a4c897f88d76e00856d6e2a59c0a91afc18 100644
--- a/ui/base/ime/chromeos/ime_keyboard.h
+++ b/ui/base/ime/chromeos/ime_keyboard.h
@@ -39,6 +39,9 @@ class UI_BASE_IME_EXPORT ImeKeyboard {
public:
// Called when the caps lock state has changed.
virtual void OnCapsLockChanged(bool enabled) = 0;
+
+ // Called when the layout state is changing.
+ virtual void OnLayoutChanging(const std::string& layout_name) = 0;
};
ImeKeyboard();
@@ -49,8 +52,10 @@ class UI_BASE_IME_EXPORT ImeKeyboard {
// Sets the current keyboard layout to |layout_name|. This function does not
// change the current mapping of the modifier keys. Returns true on success.
- virtual bool SetCurrentKeyboardLayoutByName(
- const std::string& layout_name) = 0;
+ virtual bool SetCurrentKeyboardLayoutByName(const std::string& layout_name);
+
+ // Gets the current keyboard layout name.
+ const std::string GetCurrentKeyboardLayoutName() { return last_layout_; }
reveman 2017/06/10 12:33:55 "const std::string& GetCurrentKeyboardLayoutName()
jclinton 2017/06/12 03:33:09 Done.
// Sets the current keyboard layout again. We have to call the function every
// time when "XI_HierarchyChanged" XInput2 event is sent to Chrome. See

Powered by Google App Engine
This is Rietveld 408576698