Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ | 5 #ifndef ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ |
| 6 #define ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ | 6 #define ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "ui/aura/window.h" | 11 #include "ui/aura/window.h" |
| 12 #include "ui/aura/window_observer.h" | 12 #include "ui/aura/window_observer.h" |
| 13 | 13 |
| 14 namespace ash { | 14 namespace ash { |
| 15 | 15 |
| 16 // Dispatcher for handling accelerators in ash. | 16 // Dispatcher for handling accelerators in ash. |
| 17 // Wraps a nested dispatcher to which control is passed if no accelerator key | 17 // Wraps a nested dispatcher to which control is passed if no accelerator key |
| 18 // has been pressed. | 18 // has been pressed. |
| 19 // Inner dispatcher must represent widget with no editable content. | |
|
sky
2012/02/29 22:04:18
This comment makes no sense to me.
| |
| 19 // TODO(pkotwicz): Port AcceleratorDispatcher to mac. | 20 // TODO(pkotwicz): Port AcceleratorDispatcher to mac. |
| 20 class ASH_EXPORT AcceleratorDispatcher : public MessageLoop::Dispatcher, | 21 class ASH_EXPORT AcceleratorDispatcher : public MessageLoop::Dispatcher, |
| 21 public aura::WindowObserver { | 22 public aura::WindowObserver { |
| 22 public: | 23 public: |
| 23 explicit AcceleratorDispatcher(MessageLoop::Dispatcher* nested_dispatcher, | 24 explicit AcceleratorDispatcher(MessageLoop::Dispatcher* nested_dispatcher, |
| 24 aura::Window* associated_window); | 25 aura::Window* associated_window); |
| 25 virtual ~AcceleratorDispatcher(); | 26 virtual ~AcceleratorDispatcher(); |
| 26 | 27 |
| 27 #if defined(USE_X11) | 28 #if defined(USE_X11) |
| 28 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch( | 29 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch( |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 40 // Window associated with |nested_dispatcher_| which is used to determine | 41 // Window associated with |nested_dispatcher_| which is used to determine |
| 41 // whether the |nested_dispatcher_| is allowed to receive events. | 42 // whether the |nested_dispatcher_| is allowed to receive events. |
| 42 aura::Window* associated_window_; | 43 aura::Window* associated_window_; |
| 43 | 44 |
| 44 DISALLOW_COPY_AND_ASSIGN(AcceleratorDispatcher); | 45 DISALLOW_COPY_AND_ASSIGN(AcceleratorDispatcher); |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 } // namespace ash | 48 } // namespace ash |
| 48 | 49 |
| 49 #endif // ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ | 50 #endif // ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ |
| OLD | NEW |