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

Side by Side Diff: base/message_pump_glib.cc

Issue 3801011: touchui: Directly process key and mouse events. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: nit Created 10 years, 2 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
« no previous file with comments | « base/message_pump_glib.h ('k') | base/message_pump_glib_x.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) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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_glib.h" 5 #include "base/message_pump_glib.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <math.h> 8 #include <math.h>
9 9
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 } 296 }
297 297
298 void MessagePumpForUI::AddObserver(Observer* observer) { 298 void MessagePumpForUI::AddObserver(Observer* observer) {
299 observers_.AddObserver(observer); 299 observers_.AddObserver(observer);
300 } 300 }
301 301
302 void MessagePumpForUI::RemoveObserver(Observer* observer) { 302 void MessagePumpForUI::RemoveObserver(Observer* observer) {
303 observers_.RemoveObserver(observer); 303 observers_.RemoveObserver(observer);
304 } 304 }
305 305
306 MessagePumpForUI::Dispatcher* MessagePumpForUI::GetDispatcher() {
307 return state_ ? state_->dispatcher : NULL;
308 }
309
306 void MessagePumpForUI::WillProcessEvent(GdkEvent* event) { 310 void MessagePumpForUI::WillProcessEvent(GdkEvent* event) {
307 FOR_EACH_OBSERVER(Observer, observers_, WillProcessEvent(event)); 311 FOR_EACH_OBSERVER(Observer, observers_, WillProcessEvent(event));
308 } 312 }
309 313
310 void MessagePumpForUI::DidProcessEvent(GdkEvent* event) { 314 void MessagePumpForUI::DidProcessEvent(GdkEvent* event) {
311 FOR_EACH_OBSERVER(Observer, observers_, DidProcessEvent(event)); 315 FOR_EACH_OBSERVER(Observer, observers_, DidProcessEvent(event));
312 } 316 }
313 317
314 void MessagePumpForUI::Quit() { 318 void MessagePumpForUI::Quit() {
315 if (state_) { 319 if (state_) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 DidProcessEvent(event); 351 DidProcessEvent(event);
348 } 352 }
349 353
350 // static 354 // static
351 void MessagePumpForUI::EventDispatcher(GdkEvent* event, gpointer data) { 355 void MessagePumpForUI::EventDispatcher(GdkEvent* event, gpointer data) {
352 MessagePumpForUI* message_pump = reinterpret_cast<MessagePumpForUI*>(data); 356 MessagePumpForUI* message_pump = reinterpret_cast<MessagePumpForUI*>(data);
353 message_pump->DispatchEvents(event); 357 message_pump->DispatchEvents(event);
354 } 358 }
355 359
356 } // namespace base 360 } // namespace base
OLDNEW
« no previous file with comments | « base/message_pump_glib.h ('k') | base/message_pump_glib_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698