OLD | NEW |
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 Loading... |
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 |
OLD | NEW |