summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorspang@chromium.org <spang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-15 15:52:40 +0000
committerspang@chromium.org <spang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-15 15:54:08 +0000
commit9093ea6644e784ad2e09f9c47c6c1b08d5064e58 (patch)
tree377c38c3a3dab08f0d42c41bf5c8b86e7ecb00db /ui
parent2ed35a46c99dd0447e610872a8f16b185fd08c11 (diff)
downloadchromium_src-9093ea6644e784ad2e09f9c47c6c1b08d5064e58.zip
chromium_src-9093ea6644e784ad2e09f9c47c6c1b08d5064e58.tar.gz
chromium_src-9093ea6644e784ad2e09f9c47c6c1b08d5064e58.tar.bz2
events: Remove ui::GetGestureTimes from event_utils.h
This is dead code on platforms other than X11. X11 doesn't need it to be in event_utils.h. BUG=none TEST=build Review URL: https://codereview.chromium.org/477823002 Cr-Commit-Position: refs/heads/master@{#289880} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289880 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/events/cocoa/events_mac.mm7
-rw-r--r--ui/events/event_utils.h4
-rw-r--r--ui/events/events_stub.cc7
-rw-r--r--ui/events/ozone/events_ozone.cc8
-rw-r--r--ui/events/win/events_win.cc9
-rw-r--r--ui/events/x/events_x.cc34
6 files changed, 17 insertions, 52 deletions
diff --git a/ui/events/cocoa/events_mac.mm b/ui/events/cocoa/events_mac.mm
index 6b908f0..1d5d2b8 100644
--- a/ui/events/cocoa/events_mac.mm
+++ b/ui/events/cocoa/events_mac.mm
@@ -201,13 +201,6 @@ bool GetFlingData(const base::NativeEvent& native_event,
return false;
}
-bool GetGestureTimes(const base::NativeEvent& native_event,
- double* start_time,
- double* end_time) {
- NOTIMPLEMENTED();
- return false;
-}
-
KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) {
return KeyboardCodeFromNSEvent(native_event);
}
diff --git a/ui/events/event_utils.h b/ui/events/event_utils.h
index 7e48d43..97eca9c 100644
--- a/ui/events/event_utils.h
+++ b/ui/events/event_utils.h
@@ -148,10 +148,6 @@ EVENTS_EXPORT bool GetScrollOffsets(const base::NativeEvent& native_event,
float* y_offset_ordinal,
int* finger_count);
-EVENTS_EXPORT bool GetGestureTimes(const base::NativeEvent& native_event,
- double* start_time,
- double* end_time);
-
// Returns whether natural scrolling should be used for touchpad.
EVENTS_EXPORT bool ShouldDefaultToNaturalScroll();
diff --git a/ui/events/events_stub.cc b/ui/events/events_stub.cc
index 8c60e38..f5e190d 100644
--- a/ui/events/events_stub.cc
+++ b/ui/events/events_stub.cc
@@ -122,13 +122,6 @@ bool GetFlingData(const base::NativeEvent& native_event,
return false;
}
-bool GetGestureTimes(const base::NativeEvent& native_event,
- double* start_time,
- double* end_time) {
- NOTIMPLEMENTED();
- return false;
-}
-
KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) {
NOTIMPLEMENTED();
return static_cast<KeyboardCode>(0);
diff --git a/ui/events/ozone/events_ozone.cc b/ui/events/ozone/events_ozone.cc
index b309deb..f86c9eb 100644
--- a/ui/events/ozone/events_ozone.cc
+++ b/ui/events/ozone/events_ozone.cc
@@ -145,14 +145,6 @@ bool GetFlingData(const base::NativeEvent& native_event,
return false;
}
-bool GetGestureTimes(const base::NativeEvent& native_event,
- double* start_time,
- double* end_time) {
- *start_time = 0;
- *end_time = 0;
- return false;
-}
-
int GetModifiersFromKeyState() {
NOTIMPLEMENTED();
return 0;
diff --git a/ui/events/win/events_win.cc b/ui/events/win/events_win.cc
index 5a2c7d7..1f96051 100644
--- a/ui/events/win/events_win.cc
+++ b/ui/events/win/events_win.cc
@@ -351,15 +351,6 @@ bool GetFlingData(const base::NativeEvent& native_event,
return false;
}
-bool GetGestureTimes(const base::NativeEvent& native_event,
- double* start_time,
- double* end_time) {
- // Not supported in Windows.
- *start_time = 0;
- *end_time = 0;
- return false;
-}
-
int GetModifiersFromACCEL(const ACCEL& accel) {
int modifiers = EF_NONE;
if (accel.fVirt & FSHIFT)
diff --git a/ui/events/x/events_x.cc b/ui/events/x/events_x.cc
index 7c8e225..19ce00f 100644
--- a/ui/events/x/events_x.cc
+++ b/ui/events/x/events_x.cc
@@ -334,6 +334,23 @@ unsigned int UpdateX11EventButton(int ui_flag, unsigned int old_x_button) {
NOTREACHED();
}
+bool GetGestureTimes(const base::NativeEvent& native_event,
+ double* start_time,
+ double* end_time) {
+ if (!ui::DeviceDataManagerX11::GetInstance()->HasGestureTimes(native_event))
+ return false;
+
+ double start_time_, end_time_;
+ if (!start_time)
+ start_time = &start_time_;
+ if (!end_time)
+ end_time = &end_time_;
+
+ ui::DeviceDataManagerX11::GetInstance()->GetGestureTimes(
+ native_event, start_time, end_time);
+ return true;
+}
+
} // namespace
namespace ui {
@@ -859,23 +876,6 @@ bool GetFlingData(const base::NativeEvent& native_event,
return true;
}
-bool GetGestureTimes(const base::NativeEvent& native_event,
- double* start_time,
- double* end_time) {
- if (!DeviceDataManagerX11::GetInstance()->HasGestureTimes(native_event))
- return false;
-
- double start_time_, end_time_;
- if (!start_time)
- start_time = &start_time_;
- if (!end_time)
- end_time = &end_time_;
-
- DeviceDataManagerX11::GetInstance()->GetGestureTimes(
- native_event, start_time, end_time);
- return true;
-}
-
void UpdateX11EventForFlags(Event* event) {
XEvent* xev = event->native_event();
if (!xev)