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

Unified Diff: ash/accelerators/accelerator_controller.h

Issue 11364168: Add a workaround for crbug.com/139556. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed unused var Created 8 years, 1 month 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 | ash/accelerators/accelerator_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.h
diff --git a/ash/accelerators/accelerator_controller.h b/ash/accelerators/accelerator_controller.h
index dd099ee6bc8928f01f20b7eb76e766e20bb091fd..ad55e1505264a63c122ab123e4f6f9c1eb1cc42e 100644
--- a/ash/accelerators/accelerator_controller.h
+++ b/ash/accelerators/accelerator_controller.h
@@ -39,18 +39,18 @@ class ASH_EXPORT AcceleratorControllerContext {
// event type of the previous accelerator.
void UpdateContext(const ui::Accelerator& accelerator);
- ui::EventType previous_event_type() const { return previous_event_type_; }
- bool repeated() const { return repeated_; }
+ const ui::Accelerator& previous_accelerator() const {
+ return previous_accelerator_;
+ }
+ bool repeated() const {
+ return current_accelerator_ == previous_accelerator_ &&
+ current_accelerator_.type() != ui::ET_UNKNOWN;
+ }
private:
ui::Accelerator current_accelerator_;
-
- // If the current accelerator was repeated.
- bool repeated_;
-
- // Event type of the previous accelerator. Used for NEXT_IME and
- // DISABLE_CAPS_LOCK accelerator actions.
- ui::EventType previous_event_type_;
+ // Used for NEXT_IME and DISABLE_CAPS_LOCK accelerator actions.
+ ui::Accelerator previous_accelerator_;
DISALLOW_COPY_AND_ASSIGN(AcceleratorControllerContext);
};
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698