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..a2d25fbd91a6c432dc8cd89965c5ff491d9d3ad0 100644 |
--- a/chrome/browser/ui/views/ash/key_rewriter.h |
+++ b/chrome/browser/ui/views/ash/key_rewriter.h |
@@ -54,6 +54,9 @@ class KeyRewriter : public ash::KeyRewriterDelegate, |
// Calls Rewrite. |
void RewriteForTesting(aura::KeyEvent* event); |
+ // Calls RewriteLocatedEvent. |
+ void RewriteLocatedEventForTesting(aura::LocatedEvent* event); |
+ |
const std::map<int, DeviceType>& device_id_to_type_for_testing() const { |
return device_id_to_type_; |
} |
@@ -76,6 +79,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 +117,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 +134,13 @@ class KeyRewriter : public ash::KeyRewriterDelegate, |
// Returns true if |last_device_id_| is Apple's. |
bool IsAppleKeyboard() const; |
+ // Remaps |original_flags| to |remapped_flags|, |original_native_modifiers| to |
Daniel Erat
2012/07/09 18:18:28
nit: s/,/ and/
Yusuke Sato
2012/07/09 20:36:50
Done.
|
+ // |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_; |