| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // events to a system IME. | 21 // events to a system IME. |
| 22 class ASH_EXPORT AcceleratorDispatcher : public MessageLoop::Dispatcher, | 22 class ASH_EXPORT AcceleratorDispatcher : public MessageLoop::Dispatcher, |
| 23 public aura::WindowObserver { | 23 public aura::WindowObserver { |
| 24 public: | 24 public: |
| 25 explicit AcceleratorDispatcher(MessageLoop::Dispatcher* nested_dispatcher, | 25 explicit AcceleratorDispatcher(MessageLoop::Dispatcher* nested_dispatcher, |
| 26 aura::Window* associated_window); | 26 aura::Window* associated_window); |
| 27 virtual ~AcceleratorDispatcher(); | 27 virtual ~AcceleratorDispatcher(); |
| 28 | 28 |
| 29 // MessageLoop::Dispatcher overrides: | 29 // MessageLoop::Dispatcher overrides: |
| 30 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; | 30 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; |
| 31 virtual bool ShouldExit() OVERRIDE; |
| 31 | 32 |
| 32 // aura::WindowObserver overrides: | 33 // aura::WindowObserver overrides: |
| 33 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | 34 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; |
| 34 | 35 |
| 35 private: | 36 private: |
| 36 MessageLoop::Dispatcher* nested_dispatcher_; | 37 MessageLoop::Dispatcher* nested_dispatcher_; |
| 37 | 38 |
| 38 // Window associated with |nested_dispatcher_| which is used to determine | 39 // Window associated with |nested_dispatcher_| which is used to determine |
| 39 // whether the |nested_dispatcher_| is allowed to receive events. | 40 // whether the |nested_dispatcher_| is allowed to receive events. |
| 40 aura::Window* associated_window_; | 41 aura::Window* associated_window_; |
| 41 | 42 |
| 42 DISALLOW_COPY_AND_ASSIGN(AcceleratorDispatcher); | 43 DISALLOW_COPY_AND_ASSIGN(AcceleratorDispatcher); |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 } // namespace ash | 46 } // namespace ash |
| 46 | 47 |
| 47 #endif // ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ | 48 #endif // ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ |
| OLD | NEW |