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

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

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/controls/menu/nested_dispatcher_gtk.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) 2006-2008 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)
(...skipping 22 matching lines...) Expand all
34 // This class delegates the key messages to the associated FocusManager class 34 // This class delegates the key messages to the associated FocusManager class
35 // for the window that is receiving these messages for accelerator processing. 35 // for the window that is receiving these messages for accelerator processing.
36 class AcceleratorHandler : public MessageLoopForUI::Dispatcher { 36 class AcceleratorHandler : public MessageLoopForUI::Dispatcher {
37 public: 37 public:
38 AcceleratorHandler(); 38 AcceleratorHandler();
39 39
40 // Dispatcher method. This returns true if an accelerator was processed by the 40 // Dispatcher method. This returns true if an accelerator was processed by the
41 // focus manager 41 // focus manager
42 #if defined(OS_WIN) 42 #if defined(OS_WIN)
43 virtual bool Dispatch(const MSG& msg); 43 virtual bool Dispatch(const MSG& msg);
44 #elif defined(TOUCH_UI)
45 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xev);
44 #else 46 #else
45 virtual bool Dispatch(GdkEvent* event); 47 virtual bool Dispatch(GdkEvent* event);
46 #if defined(TOUCH_UI)
47 virtual MessagePumpGlibXDispatcher::DispatchStatus DispatchX(XEvent* xev);
48 #endif
49 #endif 48 #endif
50 49
51 private: 50 private:
52 #if defined(OS_WIN) 51 #if defined(OS_WIN)
53 // The keys currently pressed and consumed by the FocusManager. 52 // The keys currently pressed and consumed by the FocusManager.
54 std::set<WPARAM> pressed_keys_; 53 std::set<WPARAM> pressed_keys_;
55 #endif 54 #endif
56 55
57 DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler); 56 DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler);
58 }; 57 };
59 58
60 } // namespace views 59 } // namespace views
61 60
62 #endif // VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ 61 #endif // VIEWS_FOCUS_ACCELERATOR_HANDLER_H_
OLDNEW
« no previous file with comments | « views/controls/menu/nested_dispatcher_gtk.cc ('k') | views/focus/accelerator_handler_touch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698