diff options
-rw-r--r-- | chrome/browser/jankometer.cc | 4 | ||||
-rw-r--r-- | chrome/common/gtk_util.cc | 73 | ||||
-rw-r--r-- | chrome/common/gtk_util.h | 5 |
3 files changed, 2 insertions, 80 deletions
diff --git a/chrome/browser/jankometer.cc b/chrome/browser/jankometer.cc index 1c73d72..7cdbe3a 100644 --- a/chrome/browser/jankometer.cc +++ b/chrome/browser/jankometer.cc @@ -178,9 +178,9 @@ class JankObserver : public base::RefCountedThreadSafe<JankObserver>, virtual void WillProcessEvent(GdkEvent* event) { begin_process_message_ = TimeTicks::Now(); // TODO(evanm): we want to set queueing_time_ using - // event_utils::GetGdkEventTime, but how do you convert that info + // gdk_event_get_time, but how do you convert that info // into a delta? - // guint event_time = event_utils::GetGdkEventTime(event); + // guint event_time = gdk_event_get_time(event); queueing_time_ = base::TimeDelta::FromMilliseconds(0); StartProcessingTimers(); } diff --git a/chrome/common/gtk_util.cc b/chrome/common/gtk_util.cc index 661517e..a491763 100644 --- a/chrome/common/gtk_util.cc +++ b/chrome/common/gtk_util.cc @@ -64,79 +64,6 @@ WindowOpenDisposition DispositionFromEventFlags(guint event_flags) { return false /*event.IsAltDown()*/ ? SAVE_TO_DISK : CURRENT_TAB; } -guint32 GetGdkEventTime(GdkEvent* event) { - // The order of these entries in the switch statement match the GDK enum. - switch (event->type) { - case GDK_NOTHING: - case GDK_DELETE: - case GDK_DESTROY: - case GDK_EXPOSE: - return 0; - - case GDK_MOTION_NOTIFY: - return reinterpret_cast<GdkEventMotion*>(event)->time; - - case GDK_BUTTON_PRESS: - case GDK_2BUTTON_PRESS: - case GDK_3BUTTON_PRESS: - case GDK_BUTTON_RELEASE: - return reinterpret_cast<GdkEventButton*>(event)->time; - - case GDK_KEY_PRESS: - case GDK_KEY_RELEASE: - return reinterpret_cast<GdkEventKey*>(event)->time; - - case GDK_ENTER_NOTIFY: - case GDK_LEAVE_NOTIFY: - return reinterpret_cast<GdkEventCrossing*>(event)->time; - - case GDK_FOCUS_CHANGE: - case GDK_CONFIGURE: - case GDK_MAP: - case GDK_UNMAP: - return 0; - - case GDK_PROPERTY_NOTIFY: - return reinterpret_cast<GdkEventProperty*>(event)->time; - - case GDK_SELECTION_CLEAR: - case GDK_SELECTION_REQUEST: - case GDK_SELECTION_NOTIFY: - return reinterpret_cast<GdkEventSelection*>(event)->time; - - case GDK_PROXIMITY_IN: - case GDK_PROXIMITY_OUT: - return reinterpret_cast<GdkEventProximity*>(event)->time; - - case GDK_DRAG_ENTER: - case GDK_DRAG_LEAVE: - case GDK_DRAG_MOTION: - case GDK_DRAG_STATUS: - case GDK_DROP_START: - case GDK_DROP_FINISHED: - return reinterpret_cast<GdkEventDND*>(event)->time; - - case GDK_CLIENT_EVENT: - case GDK_VISIBILITY_NOTIFY: - case GDK_NO_EXPOSE: - return 0; - - case GDK_SCROLL: - return reinterpret_cast<GdkEventScroll*>(event)->time; - - case GDK_WINDOW_STATE: - case GDK_SETTING: - return 0; - - case GDK_OWNER_CHANGE: - return reinterpret_cast<GdkEventOwnerChange*>(event)->time; - - case GDK_GRAB_BROKEN: - default: - return 0; - } -} - } // namespace event_utils namespace gtk_util { diff --git a/chrome/common/gtk_util.h b/chrome/common/gtk_util.h index 556e77f..8ff40c4 100644 --- a/chrome/common/gtk_util.h +++ b/chrome/common/gtk_util.h @@ -25,11 +25,6 @@ namespace event_utils { // event_flags are the state in the GdkEvent structure. WindowOpenDisposition DispositionFromEventFlags(guint state); -// Get the timestamp (milliseconds) out of a GdkEvent. -// Returns 0 if the event has no timestamp. -// TODO(evanm): see comments in jankometer.cc about using this. -guint32 GetGdkEventTime(GdkEvent* event); - } // namespace event_utils namespace gtk_util { |