Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: ui/events/x/events_x.cc

Issue 212603005: Don't handle NaturalScroll in Chrome but pass it to CMT instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Ash unit tests Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/events/x/device_data_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ui/events/x/device_data_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698