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

Side by Side Diff: ui/wm/core/nested_accelerator_dispatcher.h

Issue 298703007: Refactor and move ash independent nested accelerator code to ui/wm/core (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: skip test if platform does not support PES Created 6 years, 6 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 | « ui/wm/core/nested_accelerator_delegate.h ('k') | ui/wm/core/nested_accelerator_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 UI_WM_CORE_NESTED_ACCELERATOR_DISPATCHER_H_
6 #define UI_WM_CORE_NESTED_ACCELERATOR_DISPATCHER_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/wm/wm_export.h"
11
12 namespace base {
13 class MessagePumpDispatcher;
14 class RunLoop;
15 }
16
17 namespace ui {
18 class KeyEvent;
19 }
20
21 namespace wm {
22
23 class NestedAcceleratorDelegate;
24
25 // Dispatcher for handling accelerators from menu.
26 //
27 // Wraps a nested dispatcher to which control is passed if no accelerator key
28 // has been pressed. If the nested dispatcher is NULL, then the control is
29 // passed back to the default dispatcher.
30 // TODO(pkotwicz): Add support for a |nested_dispatcher| which sends
31 // events to a system IME.
32 class WM_EXPORT NestedAcceleratorDispatcher {
33 public:
34 virtual ~NestedAcceleratorDispatcher();
35
36 static scoped_ptr<NestedAcceleratorDispatcher> Create(
37 NestedAcceleratorDelegate* dispatcher_delegate,
38 base::MessagePumpDispatcher* nested_dispatcher);
39
40 // Creates a base::RunLoop object to run a nested message loop.
41 virtual scoped_ptr<base::RunLoop> CreateRunLoop() = 0;
42
43 protected:
44 explicit NestedAcceleratorDispatcher(NestedAcceleratorDelegate* delegate);
45
46 NestedAcceleratorDelegate*
47 delegate_; // Owned by NestedAcceleratorController.
48
49 private:
50 DISALLOW_COPY_AND_ASSIGN(NestedAcceleratorDispatcher);
51 };
52
53 } // namespace wm
54
55 #endif // UI_WM_CORE_NESTED_ACCELERATOR_DISPATCHER_H_
OLDNEW
« no previous file with comments | « ui/wm/core/nested_accelerator_delegate.h ('k') | ui/wm/core/nested_accelerator_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698