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

Unified Diff: chrome/browser/ui/views/ash/key_rewriter.h

Issue 10756003: Apply Ash's key rewriter to an aura::MouseEvent so that Modifler+Click is handled correctly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 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
« no previous file with comments | « ash/wm/key_rewriter_event_filter.cc ('k') | chrome/browser/ui/views/ash/key_rewriter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/ash/key_rewriter.h
diff --git a/chrome/browser/ui/views/ash/key_rewriter.h b/chrome/browser/ui/views/ash/key_rewriter.h
index da7ea00c0f28852e3963272859546b16edb22711..92081efa09964320863d04f44e9856ce5252de2d 100644
--- a/chrome/browser/ui/views/ash/key_rewriter.h
+++ b/chrome/browser/ui/views/ash/key_rewriter.h
@@ -76,6 +76,8 @@ class KeyRewriter : public ash::KeyRewriterDelegate,
// ash::KeyRewriterDelegate overrides:
virtual ash::KeyRewriterDelegate::Action RewriteOrFilterKeyEvent(
aura::KeyEvent* event) OVERRIDE;
+ virtual ash::KeyRewriterDelegate::Action RewriteOrFilterLocatedEvent(
+ aura::LocatedEvent* event) OVERRIDE;
// aura::RootWindowObserver overrides:
virtual void OnKeyboardMappingChanged(const aura::RootWindow* root) OVERRIDE;
@@ -112,6 +114,9 @@ class KeyRewriter : public ash::KeyRewriterDelegate,
// * Ctrl+Alt+Down -> End
bool RewriteBackspaceAndArrowKeys(aura::KeyEvent* event);
+ // Rewrites the located |event|.
+ void RewriteLocatedEvent(aura::LocatedEvent* event);
+
// Overwrites |event| with the keycodes and flags.
void OverwriteEvent(aura::KeyEvent* event,
unsigned int new_native_keycode,
@@ -126,6 +131,13 @@ class KeyRewriter : public ash::KeyRewriterDelegate,
// Returns true if |last_device_id_| is Apple's.
bool IsAppleKeyboard() const;
+ // Remaps |original_flags| to |remapped_flags| and |original_native_modifiers|
+ // to |remapped_native_modifiers| following the current user prefs.
+ void GetRemappedModifierMasks(int original_flags,
+ unsigned int original_native_modifiers,
+ int* remapped_flags,
+ unsigned int* remapped_native_modifiers) const;
+
std::map<int, DeviceType> device_id_to_type_;
int last_device_id_;
« no previous file with comments | « ash/wm/key_rewriter_event_filter.cc ('k') | chrome/browser/ui/views/ash/key_rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698