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

Side by Side Diff: base/message_pump_x.cc

Issue 7720020: Get views_unittests pass on touch build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: enable TouchSelectionControllerImplTest as they're fixed Created 9 years, 4 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 | « no previous file | views/controls/textfield/native_textfield_views_unittest.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_pump_x.h" 5 #include "base/message_pump_x.h"
6 6
7 #include <gdk/gdkx.h> 7 #include <gdk/gdkx.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 MessagePumpX* pump_x = reinterpret_cast<MessagePumpX*>(data); 244 MessagePumpX* pump_x = reinterpret_cast<MessagePumpX*>(data);
245 CHECK(use_gtk_message_pump) << "GdkEvent:" << event->type; 245 CHECK(use_gtk_message_pump) << "GdkEvent:" << event->type;
246 246
247 if (!pump_x->gdksource_) { 247 if (!pump_x->gdksource_) {
248 pump_x->gdksource_ = g_main_current_source(); 248 pump_x->gdksource_ = g_main_current_source();
249 if (pump_x->gdksource_) 249 if (pump_x->gdksource_)
250 pump_x->gdkdispatcher_ = pump_x->gdksource_->source_funcs->dispatch; 250 pump_x->gdkdispatcher_ = pump_x->gdksource_->source_funcs->dispatch;
251 } else if (!pump_x->IsDispatchingEvent()) { 251 } else if (!pump_x->IsDispatchingEvent()) {
252 if (event->type != GDK_NOTHING && 252 if (event->type != GDK_NOTHING &&
253 pump_x->capture_gdk_events_[event->type]) { 253 pump_x->capture_gdk_events_[event->type]) {
254 NOTREACHED() << "GDK received an event it shouldn't have"; 254 NOTREACHED() << "GDK received an event it shouldn't have:" << event->type;
255 } 255 }
256 } 256 }
257 257
258 gtk_main_do_event(event); 258 gtk_main_do_event(event);
259 } 259 }
260 260
261 void MessagePumpX::InitializeEventsToCapture(void) { 261 void MessagePumpX::InitializeEventsToCapture(void) {
262 // TODO(sad): Decide which events we want to capture and update the tables 262 // TODO(sad): Decide which events we want to capture and update the tables
263 // accordingly. 263 // accordingly.
264 capture_x_events_[KeyPress] = true; 264 capture_x_events_[KeyPress] = true;
(...skipping 15 matching lines...) Expand all
280 } 280 }
281 281
282 MessagePumpObserver::EventStatus 282 MessagePumpObserver::EventStatus
283 MessagePumpObserver::WillProcessXEvent(XEvent* xev) { 283 MessagePumpObserver::WillProcessXEvent(XEvent* xev) {
284 return EVENT_CONTINUE; 284 return EVENT_CONTINUE;
285 } 285 }
286 286
287 COMPILE_ASSERT(XLASTEvent >= LASTEvent, XLASTEvent_too_small); 287 COMPILE_ASSERT(XLASTEvent >= LASTEvent, XLASTEvent_too_small);
288 288
289 } // namespace base 289 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | views/controls/textfield/native_textfield_views_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698