OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/event_constants.h" | 5 #include "ui/events/event_constants.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <string.h> | 8 #include <string.h> |
9 #include <X11/extensions/XInput.h> | 9 #include <X11/extensions/XInput.h> |
10 #include <X11/extensions/XInput2.h> | 10 #include <X11/extensions/XInput2.h> |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 if (!start_time) | 660 if (!start_time) |
661 start_time = &start_time_; | 661 start_time = &start_time_; |
662 if (!end_time) | 662 if (!end_time) |
663 end_time = &end_time_; | 663 end_time = &end_time_; |
664 | 664 |
665 DeviceDataManager::GetInstance()->GetGestureTimes( | 665 DeviceDataManager::GetInstance()->GetGestureTimes( |
666 native_event, start_time, end_time); | 666 native_event, start_time, end_time); |
667 return true; | 667 return true; |
668 } | 668 } |
669 | 669 |
670 void SetNaturalScroll(bool enabled) { | |
671 DeviceDataManager::GetInstance()->set_natural_scroll_enabled(enabled); | |
672 } | |
673 | |
674 bool IsNaturalScrollEnabled() { | |
675 return DeviceDataManager::GetInstance()->natural_scroll_enabled(); | |
676 } | |
677 | |
678 bool IsTouchpadEvent(const base::NativeEvent& event) { | 670 bool IsTouchpadEvent(const base::NativeEvent& event) { |
679 return DeviceDataManager::GetInstance()->IsTouchpadXInputEvent(event); | 671 return DeviceDataManager::GetInstance()->IsTouchpadXInputEvent(event); |
680 } | 672 } |
681 | 673 |
682 } // namespace ui | 674 } // namespace ui |
OLD | NEW |