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

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

Issue 10397003: Minor improvements for key_rewriter.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 7 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 | « no previous file | 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 728daef84c287909ac1a26bfc1103d80d9a3eb50..354b2c9ed2a1ac02eaae2ada54750d3b072f48c9 100644
--- a/chrome/browser/ui/views/ash/key_rewriter.h
+++ b/chrome/browser/ui/views/ash/key_rewriter.h
@@ -41,10 +41,8 @@ class KeyRewriter : public ash::KeyRewriterDelegate,
// Calls DeviceAddedInternal.
DeviceType DeviceAddedForTesting(int device_id,
const std::string& device_name);
- // Calls RewriteCommandToControl.
- void RewriteCommandToControlForTesting(aura::KeyEvent* event);
- // Calls RewriteNumPadKeys.
- void RewriteNumPadKeysForTesting(aura::KeyEvent* event);
+ // Calls Rewrite.
+ void RewriteForTesting(aura::KeyEvent* event);
const std::map<int, DeviceType>& device_id_to_type_for_testing() const {
return device_id_to_type_;
@@ -75,6 +73,9 @@ class KeyRewriter : public ash::KeyRewriterDelegate,
void RefreshKeycodes();
#endif
+ // Rewrites the |event| by applying all RewriteXXX functions as needed.
+ void Rewrite(aura::KeyEvent* event);
+
// Rewrites Comment-L/R key presses on an Apple keyboard to Control-L/R. Only
// OS_CHROMEOS implementation is available at this point. Returns true when
// |event| is rewritten.
@@ -85,11 +86,11 @@ class KeyRewriter : public ash::KeyRewriterDelegate,
bool RewriteNumPadKeys(aura::KeyEvent* event);
// Overwrites |event| with the keycodes and flags.
- void Rewrite(aura::KeyEvent* event,
- unsigned int new_native_keycode,
- unsigned int new_native_state,
- ui::KeyboardCode new_keycode,
- int new_flags);
+ void OverwriteEvent(aura::KeyEvent* event,
+ unsigned int new_native_keycode,
+ unsigned int new_native_state,
+ ui::KeyboardCode new_keycode,
+ int new_flags);
// Checks the type of the |device_name|, and inserts a new entry to
// |device_id_to_type_|.
« no previous file with comments | « no previous file | chrome/browser/ui/views/ash/key_rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698