| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.h" | 5 #include "ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.h" |
| 6 | 6 |
| 7 #include <gestures/gestures.h> | 7 #include <gestures/gestures.h> |
| 8 #include <libevdev/libevdev.h> | 8 #include <libevdev/libevdev.h> |
| 9 | 9 |
| 10 #include <fnmatch.h> | 10 #include <fnmatch.h> |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 LOG(ERROR) << "Unsupported gestures input class match type: " | 498 LOG(ERROR) << "Unsupported gestures input class match type: " |
| 499 << match_type; | 499 << match_type; |
| 500 return false; | 500 return false; |
| 501 } | 501 } |
| 502 } | 502 } |
| 503 return false; | 503 return false; |
| 504 } | 504 } |
| 505 | 505 |
| 506 // Check if a match criteria is a device type one. | 506 // Check if a match criteria is a device type one. |
| 507 bool IsMatchDeviceType(const std::string& match_type) { | 507 bool IsMatchDeviceType(const std::string& match_type) { |
| 508 return base::StartsWithASCII(match_type, "MatchIs", true); | 508 return base::StartsWith(match_type, "MatchIs", base::CompareCase::SENSITIVE); |
| 509 } | 509 } |
| 510 | 510 |
| 511 // Parse a boolean value keyword (e.g., on/off, true/false). | 511 // Parse a boolean value keyword (e.g., on/off, true/false). |
| 512 int ParseBooleanKeyword(const std::string& value) { | 512 int ParseBooleanKeyword(const std::string& value) { |
| 513 for (size_t i = 0; i < arraysize(kTrue); ++i) { | 513 for (size_t i = 0; i < arraysize(kTrue); ++i) { |
| 514 if (base::LowerCaseEqualsASCII(value, kTrue[i])) | 514 if (base::LowerCaseEqualsASCII(value, kTrue[i])) |
| 515 return 1; | 515 return 1; |
| 516 } | 516 } |
| 517 for (size_t i = 0; i < arraysize(kFalse); ++i) { | 517 for (size_t i = 0; i < arraysize(kFalse); ++i) { |
| 518 if (base::LowerCaseEqualsASCII(value, kFalse[i])) | 518 if (base::LowerCaseEqualsASCII(value, kFalse[i])) |
| (...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1542 const GesturesPropProvider kGesturePropProvider = { | 1542 const GesturesPropProvider kGesturePropProvider = { |
| 1543 GesturesPropFunctionsWrapper::CreateInt, | 1543 GesturesPropFunctionsWrapper::CreateInt, |
| 1544 GesturesPropFunctionsWrapper::CreateShort, | 1544 GesturesPropFunctionsWrapper::CreateShort, |
| 1545 GesturesPropFunctionsWrapper::CreateBool, | 1545 GesturesPropFunctionsWrapper::CreateBool, |
| 1546 GesturesPropFunctionsWrapper::CreateString, | 1546 GesturesPropFunctionsWrapper::CreateString, |
| 1547 GesturesPropFunctionsWrapper::CreateReal, | 1547 GesturesPropFunctionsWrapper::CreateReal, |
| 1548 GesturesPropFunctionsWrapper::RegisterHandlers, | 1548 GesturesPropFunctionsWrapper::RegisterHandlers, |
| 1549 GesturesPropFunctionsWrapper::Free}; | 1549 GesturesPropFunctionsWrapper::Free}; |
| 1550 | 1550 |
| 1551 } // namespace ui | 1551 } // namespace ui |
| OLD | NEW |