| 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..0b976520fa0a7387f613b4885c1c82f45ab32306 100644
|
| --- a/remoting/client/normalizing_input_filter_cros.cc
|
| +++ b/remoting/client/normalizing_input_filter_cros.cc
|
| @@ -5,38 +5,37 @@
|
| #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 {
|
|
|
| namespace {
|
|
|
| // Returns true for OSKey codes.
|
| -static bool IsOsKey(unsigned int code) {
|
| - return code == kUsbLeftOs || code == kUsbRightOs;
|
| +static bool IsOsKey(uint32_t code) {
|
| + return code == static_cast<uint32_t>(ui::DomCode::OS_LEFT) ||
|
| + code == static_cast<uint32_t>(ui::DomCode::OS_RIGHT);
|
| }
|
|
|
| // Returns true for the left-hand Alt key.
|
| -static bool IsLeftAltKey(unsigned int code) {
|
| - return code == kUsbLeftAlt;
|
| +static bool IsLeftAltKey(uint32_t code) {
|
| + return code == static_cast<uint32_t>(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;
|
| +static bool IsRewrittenFunctionKey(uint32_t code) {
|
| + return code >= static_cast<uint32_t>(ui::DomCode::F1) &&
|
| + code <= static_cast<uint32_t>(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;
|
| +static bool IsRewrittenExtendedKey(uint32_t code) {
|
| + return code >= static_cast<uint32_t>(ui::DomCode::INSERT) &&
|
| + code <= static_cast<uint32_t>(ui::DomCode::PAGE_DOWN);
|
| }
|
|
|
| // Returns true for codes generated by EventRewriter::Rewrite().
|
| -static bool IsRewrittenKey(unsigned int code) {
|
| +static bool IsRewrittenKey(uint32_t code) {
|
| return IsRewrittenExtendedKey(code) || IsRewrittenFunctionKey(code);
|
| }
|
|
|
|
|