| OLD | NEW |
| 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 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 class VIEWS_EXPORT AcceleratorHandler : public MessageLoop::Dispatcher { | 33 class VIEWS_EXPORT AcceleratorHandler : public MessageLoop::Dispatcher { |
| 34 public: | 34 public: |
| 35 AcceleratorHandler(); | 35 AcceleratorHandler(); |
| 36 | 36 |
| 37 // Dispatcher method. This returns true if an accelerator was processed by the | 37 // Dispatcher method. This returns true if an accelerator was processed by the |
| 38 // focus manager | 38 // focus manager |
| 39 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
| 40 virtual bool Dispatch(const MSG& msg); | 40 virtual bool Dispatch(const MSG& msg); |
| 41 #elif defined(USE_WAYLAND) | 41 #elif defined(USE_WAYLAND) |
| 42 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch( | 42 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch( |
| 43 ui::WaylandEvent* ev); | 43 base::wayland::WaylandEvent* ev); |
| 44 #elif defined(TOUCH_UI) || defined(USE_AURA) | 44 #elif defined(TOUCH_UI) || defined(USE_AURA) |
| 45 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xev); | 45 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xev); |
| 46 #else | 46 #else |
| 47 virtual bool Dispatch(GdkEvent* event); | 47 virtual bool Dispatch(GdkEvent* event); |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 #if defined(OS_WIN) | 51 #if defined(OS_WIN) |
| 52 // The keys currently pressed and consumed by the FocusManager. | 52 // The keys currently pressed and consumed by the FocusManager. |
| 53 std::set<WPARAM> pressed_keys_; | 53 std::set<WPARAM> pressed_keys_; |
| 54 #endif | 54 #endif |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler); | 56 DISALLOW_COPY_AND_ASSIGN(AcceleratorHandler); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace views | 59 } // namespace views |
| 60 | 60 |
| 61 #endif // VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ | 61 #endif // VIEWS_FOCUS_ACCELERATOR_HANDLER_H_ |
| OLD | NEW |