Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ | |
| 6 #define ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "ash/ash_export.h" | |
| 10 #include "base/message_loop.h" | |
| 11 | |
| 12 namespace ash { | |
| 13 | |
| 14 // Dispatcher for handling accelerators in ash. | |
| 15 // Wraps a nested dispatcher to which control is passed if no accelerator key | |
| 16 // has been pressed. | |
| 17 | |
| 18 #if defined(OS_MACOSX) | |
| 19 class ASH_EXPORT AcceleratorDispatcher { | |
| 20 #else | |
| 21 class ASH_EXPORT AcceleratorDispatcher : public MessageLoop::Dispatcher { | |
| 22 #endif // defined(OS_MACOSX) | |
| 23 public: | |
| 24 explicit AcceleratorDispatcher(MessageLoop::Dispatcher* nested_dispatcher); | |
| 25 | |
| 26 #if defined(OS_POSIX) | |
| 27 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch( | |
| 28 XEvent* xev) OVERRIDE; | |
|
oshima
2012/01/25 21:24:37
This doesn't make sense for mac (OS_POSIX is defin
| |
| 29 #elif defined(OS_WIN) | |
| 30 bool AcceleratorDispatcher::Dispatch(const MSG& msg) OVERRIDE; | |
| 31 #endif | |
| 32 | |
| 33 private: | |
| 34 MessageLoop::Dispatcher* nested_dispatcher_; | |
| 35 | |
| 36 DISALLOW_COPY_AND_ASSIGN(AcceleratorDispatcher); | |
| 37 }; | |
| 38 | |
| 39 } // namespace ash | |
| 40 | |
| 41 #endif // ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ | |
| OLD | NEW |