Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: ash/accelerators/accelerator_dispatcher.h

Issue 9538015: Allows ash accelerators in wrench menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes win compile Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/accelerators/accelerator_dispatcher_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // TODO(pkotwicz): Port AcceleratorDispatcher to mac. 19 // TODO(pkotwicz): Port AcceleratorDispatcher to mac.
20 // TODO(pkotwicz): Add support for a |nested_dispatcher| which sends
21 // events to a system IME.
20 class ASH_EXPORT AcceleratorDispatcher : public MessageLoop::Dispatcher, 22 class ASH_EXPORT AcceleratorDispatcher : public MessageLoop::Dispatcher,
21 public aura::WindowObserver { 23 public aura::WindowObserver {
22 public: 24 public:
23 explicit AcceleratorDispatcher(MessageLoop::Dispatcher* nested_dispatcher, 25 explicit AcceleratorDispatcher(MessageLoop::Dispatcher* nested_dispatcher,
24 aura::Window* associated_window); 26 aura::Window* associated_window);
25 virtual ~AcceleratorDispatcher(); 27 virtual ~AcceleratorDispatcher();
26 28
27 #if defined(USE_X11) 29 #if defined(USE_X11)
28 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch( 30 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(
29 XEvent* xev) OVERRIDE; 31 XEvent* xev) OVERRIDE;
(...skipping 10 matching lines...) Expand all
40 // Window associated with |nested_dispatcher_| which is used to determine 42 // Window associated with |nested_dispatcher_| which is used to determine
41 // whether the |nested_dispatcher_| is allowed to receive events. 43 // whether the |nested_dispatcher_| is allowed to receive events.
42 aura::Window* associated_window_; 44 aura::Window* associated_window_;
43 45
44 DISALLOW_COPY_AND_ASSIGN(AcceleratorDispatcher); 46 DISALLOW_COPY_AND_ASSIGN(AcceleratorDispatcher);
45 }; 47 };
46 48
47 } // namespace ash 49 } // namespace ash
48 50
49 #endif // ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_ 51 #endif // ASH_ACCELERATORS_ACCELERATOR_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/accelerators/accelerator_dispatcher_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698