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

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

Issue 154203002: Remove unnecessary uses of aura::Env::GetDispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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 | « ui/views/controls/menu/menu_controller.cc ('k') | ui/views/focus/accelerator_handler_aura.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #include <set> 10 #include <set>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/message_loop/message_pump_dispatcher.h" 15 #include "base/message_loop/message_pump_dispatcher.h"
16 #include "ui/views/views_export.h" 16 #include "ui/views/views_export.h"
17 17
18 namespace views { 18 namespace views {
19 19
20 #if defined(USE_AURA) && defined(USE_X11)
21 // Dispatch an XEvent to the RootView. Return true if the event was dispatched
22 // and handled, false otherwise.
23 bool VIEWS_EXPORT DispatchXEvent(XEvent* xevent);
24 #endif // USE_AURA && USE_X11
25
26 // This class delegates the key messages to the associated FocusManager class 20 // This class delegates the key messages to the associated FocusManager class
27 // for the window that is receiving these messages for accelerator processing. 21 // for the window that is receiving these messages for accelerator processing.
28 class VIEWS_EXPORT AcceleratorHandler : public base::MessagePumpDispatcher { 22 class VIEWS_EXPORT AcceleratorHandler : public base::MessagePumpDispatcher {
29 public: 23 public:
30 AcceleratorHandler(); 24 AcceleratorHandler();
31 25
32 // Dispatcher method. This returns true if an accelerator was processed by the 26 // Dispatcher method. This returns true if an accelerator was processed by the
33 // focus manager 27 // focus manager
34 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; 28 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
35 29
36 private: 30 private:
37 #if defined(OS_WIN) 31 #if defined(OS_WIN)
38 // The keys currently pressed and consumed by the FocusManager. 32 // The keys currently pressed and consumed by the FocusManager.
39 std::set<WPARAM> pressed_keys_; 33 std::set<WPARAM> pressed_keys_;
40 #endif 34 #endif
41 35
42 DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler); 36 DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler);
43 }; 37 };
44 38
45 } // namespace views 39 } // namespace views
46 40
47 #endif // UI_VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ 41 #endif // UI_VIEWS_FOCUS_ACCELERATOR_HANDLER_H_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_controller.cc ('k') | ui/views/focus/accelerator_handler_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698