| 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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 } | 601 } |
| 602 return os; | 602 return os; |
| 603 } | 603 } |
| 604 | 604 |
| 605 namespace ui { | 605 namespace ui { |
| 606 namespace internal { | 606 namespace internal { |
| 607 | 607 |
| 608 // Mapping table from a property name to its corresponding GesturesProp | 608 // Mapping table from a property name to its corresponding GesturesProp |
| 609 // object pointer. | 609 // object pointer. |
| 610 typedef base::hash_map<std::string, GesturesProp*> PropertiesMap; | 610 typedef base::hash_map<std::string, GesturesProp*> PropertiesMap; |
| 611 typedef base::ScopedPtrHashMap<std::string, GesturesProp> ScopedPropertiesMap; | 611 typedef base::ScopedPtrHashMap<std::string, scoped_ptr<GesturesProp>> |
| 612 ScopedPropertiesMap; |
| 612 | 613 |
| 613 // Struct holding properties of a device. | 614 // Struct holding properties of a device. |
| 614 // | 615 // |
| 615 // Note that we can't define it in GesturePropertyProvider as a nested class | 616 // Note that we can't define it in GesturePropertyProvider as a nested class |
| 616 // because ScopedPtrHashMap will require us to expose the GestureProp's | 617 // because ScopedPtrHashMap will require us to expose the GestureProp's |
| 617 // destructor so that it can instantiate the object. This is something we | 618 // destructor so that it can instantiate the object. This is something we |
| 618 // don't want to do. | 619 // don't want to do. |
| 619 struct GestureDevicePropertyData { | 620 struct GestureDevicePropertyData { |
| 620 GestureDevicePropertyData() {} | 621 GestureDevicePropertyData() {} |
| 621 | 622 |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1538 const GesturesPropProvider kGesturePropProvider = { | 1539 const GesturesPropProvider kGesturePropProvider = { |
| 1539 GesturesPropFunctionsWrapper::CreateInt, | 1540 GesturesPropFunctionsWrapper::CreateInt, |
| 1540 GesturesPropFunctionsWrapper::CreateShort, | 1541 GesturesPropFunctionsWrapper::CreateShort, |
| 1541 GesturesPropFunctionsWrapper::CreateBool, | 1542 GesturesPropFunctionsWrapper::CreateBool, |
| 1542 GesturesPropFunctionsWrapper::CreateString, | 1543 GesturesPropFunctionsWrapper::CreateString, |
| 1543 GesturesPropFunctionsWrapper::CreateReal, | 1544 GesturesPropFunctionsWrapper::CreateReal, |
| 1544 GesturesPropFunctionsWrapper::RegisterHandlers, | 1545 GesturesPropFunctionsWrapper::RegisterHandlers, |
| 1545 GesturesPropFunctionsWrapper::Free}; | 1546 GesturesPropFunctionsWrapper::Free}; |
| 1546 | 1547 |
| 1547 } // namespace ui | 1548 } // namespace ui |
| OLD | NEW |