| 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 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 Loading... |
| 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_ |
| OLD | NEW |