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

Side by Side Diff: ui/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 | « media/media.gyp ('k') | views/controls/menu/menu_controller.h » ('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 UI_VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ 5 #ifndef UI_VIEWS_FOCUS_ACCELERATOR_HANDLER_H_
6 #define UI_VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ 6 #define UI_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
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // controls within a window need to be Widgets - some are native controls from 43 // controls within a window need to be Widgets - some are native controls from
44 // the underlying toolkit wrapped by NativeViewHost. 44 // the underlying toolkit wrapped by NativeViewHost.
45 // 45 //
46 class AcceleratorHandler : public MessageLoopForUI::Dispatcher { 46 class AcceleratorHandler : public MessageLoopForUI::Dispatcher {
47 public: 47 public:
48 AcceleratorHandler(); 48 AcceleratorHandler();
49 // Dispatcher method. This returns true if an accelerator was processed by the 49 // Dispatcher method. This returns true if an accelerator was processed by the
50 // focus manager 50 // focus manager
51 #if defined(OS_WIN) 51 #if defined(OS_WIN)
52 virtual bool Dispatch(const MSG& msg); 52 virtual bool Dispatch(const MSG& msg);
53 #elif defined(TOUCH_UI)
54 virtual MesasgePumpDispatcher::DispatchStatus Dispatch(XEvent* xev);
53 #else 55 #else
54 virtual bool Dispatch(GdkEvent* event); 56 virtual bool Dispatch(GdkEvent* event);
55 #if defined(TOUCH_UI)
56 virtual MessagePumpGlibXDispatcher::DispatchStatus Dispatch(XEvent* xev);
57 #endif
58 #endif 57 #endif
59 58
60 private: 59 private:
61 #if defined(OS_WIN) 60 #if defined(OS_WIN)
62 // The keys currently pressed and consumed by the FocusManager. 61 // The keys currently pressed and consumed by the FocusManager.
63 std::set<WPARAM> pressed_keys_; 62 std::set<WPARAM> pressed_keys_;
64 #endif 63 #endif
65 64
66 DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler); 65 DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler);
67 }; 66 };
68 67
69 } // namespace ui 68 } // namespace ui
70 69
71 #endif // UI_VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ 70 #endif // UI_VIEWS_FOCUS_ACCELERATOR_HANDLER_H_
OLDNEW
« no previous file with comments | « media/media.gyp ('k') | views/controls/menu/menu_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698