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

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

Issue 9958152: Consolidate win/x dispatchers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync, addressed comments Created 8 years, 8 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 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 17 matching lines...) Expand all
28 #if defined(OS_MACOSX) 28 #if defined(OS_MACOSX)
29 class VIEWS_EXPORT AcceleratorHandler { 29 class VIEWS_EXPORT AcceleratorHandler {
30 #else 30 #else
31 class VIEWS_EXPORT AcceleratorHandler : public MessageLoop::Dispatcher { 31 class VIEWS_EXPORT AcceleratorHandler : public MessageLoop::Dispatcher {
32 #endif // defined(OS_MACOSX) 32 #endif // defined(OS_MACOSX)
33 public: 33 public:
34 AcceleratorHandler(); 34 AcceleratorHandler();
35 35
36 // Dispatcher method. This returns true if an accelerator was processed by the 36 // Dispatcher method. This returns true if an accelerator was processed by the
37 // focus manager 37 // focus manager
38 #if defined(OS_WIN) 38 #if defined(OS_WIN) || defined(USE_AURA)
39 virtual bool Dispatch(const MSG& msg) OVERRIDE; 39 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
40 #elif defined(OS_MACOSX) 40 #elif defined(OS_MACOSX)
41 // TODO(dhollowa): Implement on Mac. http://crbug.com/109946 41 // TODO(dhollowa): Implement on Mac. http://crbug.com/109946
42 #elif defined(USE_AURA)
43 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(
44 XEvent* xev) OVERRIDE;
45 #endif 42 #endif
46 43
47 private: 44 private:
48 #if defined(OS_WIN) 45 #if defined(OS_WIN)
49 // The keys currently pressed and consumed by the FocusManager. 46 // The keys currently pressed and consumed by the FocusManager.
50 std::set<WPARAM> pressed_keys_; 47 std::set<WPARAM> pressed_keys_;
51 #endif 48 #endif
52 49
53 DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler); 50 DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler);
54 }; 51 };
55 52
56 } // namespace views 53 } // namespace views
57 54
58 #endif // UI_VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ 55 #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