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

Side by Side Diff: views/focus/accelerator_handler.h

Issue 6975045: touch: Always expect XInput2 availability. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 5 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/events/event_x.cc ('k') | views/focus/accelerator_handler_touch.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 #ifndef VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ 5 #ifndef VIEWS_FOCUS_ACCELERATOR_HANDLER_H_
6 #define VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ 6 #define VIEWS_FOCUS_ACCELERATOR_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
11 #if defined(OS_LINUX) 11 #if defined(OS_LINUX)
12 #include <gdk/gdk.h> 12 #include <gdk/gdk.h>
13 #endif 13 #endif
14 14
15 #include <set> 15 #include <set>
16 #include <vector> 16 #include <vector>
17 17
18 #include "base/message_loop.h" 18 #include "base/message_loop.h"
19 19
20 namespace views { 20 namespace views {
21 21
22 #if defined(TOUCH_UI) 22 #if defined(TOUCH_UI)
23 // Dispatch an XEvent to the RootView. Return true if the event was dispatched 23 // Dispatch an XEvent to the RootView. Return true if the event was dispatched
24 // and handled, false otherwise. 24 // and handled, false otherwise.
25 bool DispatchXEvent(XEvent* xevent); 25 bool DispatchXEvent(XEvent* xevent);
26 26
27 #if defined(HAVE_XINPUT2)
28 // Keep a list of touch devices so that it is possible to determine if a pointer 27 // Keep a list of touch devices so that it is possible to determine if a pointer
29 // event is a touch-event or a mouse-event. 28 // event is a touch-event or a mouse-event.
30 void SetTouchDeviceList(std::vector<unsigned int>& devices); 29 void SetTouchDeviceList(std::vector<unsigned int>& devices);
31 #endif // HAVE_XINPUT2
32 #endif // TOUCH_UI 30 #endif // TOUCH_UI
33 31
34 // This class delegates the key messages to the associated FocusManager class 32 // This class delegates the key messages to the associated FocusManager class
35 // for the window that is receiving these messages for accelerator processing. 33 // for the window that is receiving these messages for accelerator processing.
36 class AcceleratorHandler : public MessageLoopForUI::Dispatcher { 34 class AcceleratorHandler : public MessageLoopForUI::Dispatcher {
37 public: 35 public:
38 AcceleratorHandler(); 36 AcceleratorHandler();
39 37
40 // Dispatcher method. This returns true if an accelerator was processed by the 38 // Dispatcher method. This returns true if an accelerator was processed by the
41 // focus manager 39 // focus manager
(...skipping 10 matching lines...) Expand all
52 // The keys currently pressed and consumed by the FocusManager. 50 // The keys currently pressed and consumed by the FocusManager.
53 std::set<WPARAM> pressed_keys_; 51 std::set<WPARAM> pressed_keys_;
54 #endif 52 #endif
55 53
56 DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler); 54 DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler);
57 }; 55 };
58 56
59 } // namespace views 57 } // namespace views
60 58
61 #endif // VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ 59 #endif // VIEWS_FOCUS_ACCELERATOR_HANDLER_H_
OLDNEW
« no previous file with comments | « views/events/event_x.cc ('k') | views/focus/accelerator_handler_touch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698