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 <fnmatch.h> | 7 #include <fnmatch.h> |
8 #include <gestures/gestures.h> | 8 #include <gestures/gestures.h> |
9 #include <libevdev/libevdev.h> | 9 #include <libevdev/libevdev.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1071 std::string piece(pieces.token()); | 1071 std::string piece(pieces.token()); |
1072 | 1072 |
1073 // Skip empty pieces. | 1073 // Skip empty pieces. |
1074 if (piece.empty()) | 1074 if (piece.empty()) |
1075 continue; | 1075 continue; |
1076 | 1076 |
1077 // See if we are currently parsing an entry or are still looking for | 1077 // See if we are currently parsing an entry or are still looking for |
1078 // one. | 1078 // one. |
1079 if (is_parsing) { | 1079 if (is_parsing) { |
1080 // Stop parsing the current line if the format is wrong. | 1080 // Stop parsing the current line if the format is wrong. |
1081 if (piece.size() <= 2 || piece[0] != '\"' || | 1081 if (piece.size() <= 2 || piece[0] != '\"' || piece.back() != '\"') { |
1082 piece[piece.size() - 1] != '\"') { | |
1083 LOG(ERROR) << "Error parsing line: " << lines.token(); | 1082 LOG(ERROR) << "Error parsing line: " << lines.token(); |
1084 has_error = true; | 1083 has_error = true; |
1085 if (next_is_section_type) | 1084 if (next_is_section_type) |
1086 is_input_class_section = false; | 1085 is_input_class_section = false; |
1087 break; | 1086 break; |
1088 } | 1087 } |
1089 | 1088 |
1090 // Parse the arguments. Note that we don't break even if a whitespace | 1089 // Parse the arguments. Note that we don't break even if a whitespace |
1091 // string is passed. It will just be handled in various ways based on | 1090 // string is passed. It will just be handled in various ways based on |
1092 // the entry type. | 1091 // the entry type. |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1546 const GesturesPropProvider kGesturePropProvider = { | 1545 const GesturesPropProvider kGesturePropProvider = { |
1547 GesturesPropFunctionsWrapper::CreateInt, | 1546 GesturesPropFunctionsWrapper::CreateInt, |
1548 GesturesPropFunctionsWrapper::CreateShort, | 1547 GesturesPropFunctionsWrapper::CreateShort, |
1549 GesturesPropFunctionsWrapper::CreateBool, | 1548 GesturesPropFunctionsWrapper::CreateBool, |
1550 GesturesPropFunctionsWrapper::CreateString, | 1549 GesturesPropFunctionsWrapper::CreateString, |
1551 GesturesPropFunctionsWrapper::CreateReal, | 1550 GesturesPropFunctionsWrapper::CreateReal, |
1552 GesturesPropFunctionsWrapper::RegisterHandlers, | 1551 GesturesPropFunctionsWrapper::RegisterHandlers, |
1553 GesturesPropFunctionsWrapper::Free}; | 1552 GesturesPropFunctionsWrapper::Free}; |
1554 | 1553 |
1555 } // namespace ui | 1554 } // namespace ui |
OLD | NEW |