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

Unified Diff: ash/sticky_keys/sticky_keys_controller.cc

Issue 187313002: Update StickyKeys overlay to show or hide AltGr depending on the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix rebase Created 6 years, 9 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 | « ash/sticky_keys/sticky_keys_controller.h ('k') | ash/sticky_keys/sticky_keys_overlay.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/sticky_keys/sticky_keys_controller.cc
diff --git a/ash/sticky_keys/sticky_keys_controller.cc b/ash/sticky_keys/sticky_keys_controller.cc
index 812e46eaa233a0607adaebfa7d1596e232bf8fb6..e5bb0afe2483c32c1dbd4a20dfff9f6583cf4c8b 100644
--- a/ash/sticky_keys/sticky_keys_controller.cc
+++ b/ash/sticky_keys/sticky_keys_controller.cc
@@ -97,7 +97,9 @@ void StickyKeysHandlerDelegateImpl::DispatchEvent(ui::Event* event,
///////////////////////////////////////////////////////////////////////////////
// StickyKeys
StickyKeysController::StickyKeysController()
- : enabled_(false) {
+ : enabled_(false),
+ mod3_enabled_(false),
+ altgr_enabled_(false) {
}
StickyKeysController::~StickyKeysController() {
@@ -124,12 +126,21 @@ void StickyKeysController::Enable(bool enabled) {
new StickyKeysHandlerDelegateImpl()));
overlay_.reset(new StickyKeysOverlay());
- } else if (overlay_.get()) {
+ overlay_->SetModifierVisible(ui::EF_ALTGR_DOWN, altgr_enabled_);
+ } else if (overlay_) {
overlay_->Show(false);
}
}
}
+void StickyKeysController::SetModifiersEnabled(bool mod3_enabled,
+ bool altgr_enabled) {
+ mod3_enabled_ = mod3_enabled;
+ altgr_enabled_ = altgr_enabled;
+ if (overlay_)
+ overlay_->SetModifierVisible(ui::EF_ALTGR_DOWN, altgr_enabled_);
+}
+
bool StickyKeysController::HandleKeyEvent(ui::KeyEvent* event) {
return shift_sticky_key_->HandleKeyEvent(event) ||
alt_sticky_key_->HandleKeyEvent(event) ||
« no previous file with comments | « ash/sticky_keys/sticky_keys_controller.h ('k') | ash/sticky_keys/sticky_keys_overlay.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698