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

Side by Side Diff: views/focus/accelerator_handler_touch.cc

Issue 7250001: Refactor the glib message-pump, and use it as the base for a gtk message pump and an X message pump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: media.gyp update Created 9 years, 6 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 | « views/focus/accelerator_handler.h ('k') | views/views.gyp » ('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 "views/focus/accelerator_handler.h" 5 #include "views/focus/accelerator_handler.h"
6 6
7 #include <bitset> 7 #include <bitset>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #if defined(HAVE_XINPUT2) 9 #if defined(HAVE_XINPUT2)
10 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 170 }
171 171
172 #if defined(HAVE_XINPUT2) 172 #if defined(HAVE_XINPUT2)
173 void SetTouchDeviceList(std::vector<unsigned int>& devices) { 173 void SetTouchDeviceList(std::vector<unsigned int>& devices) {
174 TouchFactory::GetInstance()->SetTouchDeviceList(devices); 174 TouchFactory::GetInstance()->SetTouchDeviceList(devices);
175 } 175 }
176 #endif 176 #endif
177 177
178 AcceleratorHandler::AcceleratorHandler() {} 178 AcceleratorHandler::AcceleratorHandler() {}
179 179
180 #if defined(TOUCH_UI)
181 base::MessagePumpDispatcher::DispatchStatus
182 AcceleratorHandler::Dispatch(XEvent* xev) {
183 return DispatchXEvent(xev) ?
184 base::MessagePumpDispatcher::EVENT_PROCESSED :
185 base::MessagePumpDispatcher::EVENT_IGNORED;
186 }
187 #else
180 bool AcceleratorHandler::Dispatch(GdkEvent* event) { 188 bool AcceleratorHandler::Dispatch(GdkEvent* event) {
181 gtk_main_do_event(event); 189 gtk_main_do_event(event);
182 return true; 190 return true;
183 } 191 }
184 192 #endif
185 base::MessagePumpGlibXDispatcher::DispatchStatus
186 AcceleratorHandler::DispatchX(XEvent* xev) {
187 return DispatchXEvent(xev) ?
188 base::MessagePumpGlibXDispatcher::EVENT_PROCESSED :
189 base::MessagePumpGlibXDispatcher::EVENT_IGNORED;
190 }
191 193
192 } // namespace views 194 } // namespace views
OLDNEW
« no previous file with comments | « views/focus/accelerator_handler.h ('k') | views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698