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/base/events.h" | 5 #include "ui/base/events.h" |
6 | 6 |
7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
8 #include <X11/extensions/XInput.h> | 8 #include <X11/extensions/XInput.h> |
9 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
10 #include <string.h> | 10 #include <string.h> |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 return CMTEventData::GetInstance()->GetGestureTimes( | 727 return CMTEventData::GetInstance()->GetGestureTimes( |
728 *native_event, start_time, end_time); | 728 *native_event, start_time, end_time); |
729 } | 729 } |
730 | 730 |
731 void UpdateDeviceList() { | 731 void UpdateDeviceList() { |
732 Display* display = GetXDisplay(); | 732 Display* display = GetXDisplay(); |
733 CMTEventData::GetInstance()->UpdateDeviceList(display); | 733 CMTEventData::GetInstance()->UpdateDeviceList(display); |
734 TouchFactory::GetInstance()->UpdateDeviceList(display); | 734 TouchFactory::GetInstance()->UpdateDeviceList(display); |
735 } | 735 } |
736 | 736 |
737 bool IsNoopEvent(base::NativeEvent event) { | 737 bool IsNoopEvent(const base::NativeEvent& event) { |
738 #if defined(TOOLKIT_USES_GTK) | 738 #if defined(TOOLKIT_USES_GTK) |
739 NOTREACHED(); | 739 NOTREACHED(); |
740 return false; | 740 return false; |
741 #else | 741 #else |
742 return (event->type == ClientMessage && | 742 return (event->type == ClientMessage && |
743 event->xclient.message_type == GetNoopEventAtom()); | 743 event->xclient.message_type == GetNoopEventAtom()); |
744 #endif | 744 #endif |
745 } | 745 } |
746 | 746 |
747 base::NativeEvent CreateNoopEvent() { | 747 base::NativeEvent CreateNoopEvent() { |
(...skipping 11 matching lines...) Expand all Loading... |
759 NOTREACHED(); | 759 NOTREACHED(); |
760 #else | 760 #else |
761 // Make sure we use atom from current xdisplay, which may | 761 // Make sure we use atom from current xdisplay, which may |
762 // change during the test. | 762 // change during the test. |
763 noop->xclient.message_type = GetNoopEventAtom(); | 763 noop->xclient.message_type = GetNoopEventAtom(); |
764 #endif | 764 #endif |
765 return noop; | 765 return noop; |
766 } | 766 } |
767 | 767 |
768 } // namespace ui | 768 } // namespace ui |
OLD | NEW |