Chromium Code Reviews| Index: remoting/client/normalizing_input_filter_cros.cc |
| diff --git a/remoting/client/normalizing_input_filter_cros.cc b/remoting/client/normalizing_input_filter_cros.cc |
| index 9ab8bc9aec6244cb48d5062235bf413a7886f673..272806970a86c80ef32bd6b788790e3ba092033b 100644 |
| --- a/remoting/client/normalizing_input_filter_cros.cc |
| +++ b/remoting/client/normalizing_input_filter_cros.cc |
| @@ -5,7 +5,7 @@ |
| #include "remoting/client/normalizing_input_filter_cros.h" |
| #include "base/logging.h" |
| -#include "remoting/protocol/usb_key_codes.h" |
| +#include "ui/events/keycodes/dom/dom_code.h" |
| namespace remoting { |
| @@ -13,26 +13,25 @@ namespace { |
| // Returns true for OSKey codes. |
| static bool IsOsKey(unsigned int code) { |
|
Sergey Ulanov
2015/10/12 21:45:57
Change these helper functions to use uint32_t inst
Jamie
2015/10/12 22:26:09
Done.
|
| - return code == kUsbLeftOs || code == kUsbRightOs; |
| + return code == static_cast<unsigned int>(ui::DomCode::OS_LEFT) || |
|
Sergey Ulanov
2015/10/12 21:45:57
s/unsigned int/uint32_t/
Jamie
2015/10/12 22:26:09
Done.
|
| + code == static_cast<unsigned int>(ui::DomCode::OS_RIGHT); |
| } |
| // Returns true for the left-hand Alt key. |
| static bool IsLeftAltKey(unsigned int code) { |
| - return code == kUsbLeftAlt; |
| + return code == static_cast<unsigned int>(ui::DomCode::ALT_LEFT); |
| } |
| // Returns true for codes generated by EventRewriter::RewriteFunctionKeys(). |
| static bool IsRewrittenFunctionKey(unsigned int code) { |
| - const unsigned int kUsbFunctionKeyMin = 0x07003a; |
| - const unsigned int kUsbFunctionKeyMax = 0x070045; |
| - return code >= kUsbFunctionKeyMin && code <= kUsbFunctionKeyMax; |
| + return code >= static_cast<unsigned int>(ui::DomCode::F1) && |
| + code <= static_cast<unsigned int>(ui::DomCode::F12); |
| } |
| // Returns true for codes generated by EventRewriter::RewriteExtendedKeys(). |
| static bool IsRewrittenExtendedKey(unsigned int code) { |
| - const unsigned int kUsbExtendedKeyMin = 0x070049; |
| - const unsigned int kUsbExtendedKeyMax = 0x07004e; |
| - return code >= kUsbExtendedKeyMin && code <= kUsbExtendedKeyMax; |
| + return code >= static_cast<unsigned int>(ui::DomCode::INSERT) && |
| + code <= static_cast<unsigned int>(ui::DomCode::PAGE_DOWN); |
| } |
| // Returns true for codes generated by EventRewriter::Rewrite(). |