| 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 "base/message_loop/message_pump_gtk.h" | 5 #include "base/message_loop/message_pump_gtk.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 #include <gdk/gdkx.h> | 8 #include <gdk/gdkx.h> |
| 9 | 9 |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| 11 #include "base/profiler/scoped_profile.h" | 11 #include "base/profiler/scoped_profile.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 const char* EventToTypeString(const GdkEvent* event) { | 17 ALLOW_UNUSED const char* EventToTypeString(const GdkEvent* event) { |
| 18 switch (event->type) { | 18 switch (event->type) { |
| 19 case GDK_NOTHING: return "GDK_NOTHING"; | 19 case GDK_NOTHING: return "GDK_NOTHING"; |
| 20 case GDK_DELETE: return "GDK_DELETE"; | 20 case GDK_DELETE: return "GDK_DELETE"; |
| 21 case GDK_DESTROY: return "GDK_DESTROY"; | 21 case GDK_DESTROY: return "GDK_DESTROY"; |
| 22 case GDK_EXPOSE: return "GDK_EXPOSE"; | 22 case GDK_EXPOSE: return "GDK_EXPOSE"; |
| 23 case GDK_MOTION_NOTIFY: return "GDK_MOTION_NOTIFY"; | 23 case GDK_MOTION_NOTIFY: return "GDK_MOTION_NOTIFY"; |
| 24 case GDK_BUTTON_PRESS: return "GDK_BUTTON_PRESS"; | 24 case GDK_BUTTON_PRESS: return "GDK_BUTTON_PRESS"; |
| 25 case GDK_2BUTTON_PRESS: return "GDK_2BUTTON_PRESS"; | 25 case GDK_2BUTTON_PRESS: return "GDK_2BUTTON_PRESS"; |
| 26 case GDK_3BUTTON_PRESS: return "GDK_3BUTTON_PRESS"; | 26 case GDK_3BUTTON_PRESS: return "GDK_3BUTTON_PRESS"; |
| 27 case GDK_BUTTON_RELEASE: return "GDK_BUTTON_RELEASE"; | 27 case GDK_BUTTON_RELEASE: return "GDK_BUTTON_RELEASE"; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 DidProcessEvent(event)); | 111 DidProcessEvent(event)); |
| 112 } | 112 } |
| 113 | 113 |
| 114 // static | 114 // static |
| 115 void MessagePumpGtk::EventDispatcher(GdkEvent* event, gpointer data) { | 115 void MessagePumpGtk::EventDispatcher(GdkEvent* event, gpointer data) { |
| 116 MessagePumpGtk* message_pump = reinterpret_cast<MessagePumpGtk*>(data); | 116 MessagePumpGtk* message_pump = reinterpret_cast<MessagePumpGtk*>(data); |
| 117 message_pump->DispatchEvents(event); | 117 message_pump->DispatchEvents(event); |
| 118 } | 118 } |
| 119 | 119 |
| 120 } // namespace base | 120 } // namespace base |
| OLD | NEW |