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

Side by Side Diff: ui/wm/core/nested_accelerator_controller.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/DEPS ('k') | ui/wm/core/nested_accelerator_controller.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 2014 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_NESTED_DISPATCHER_CONTROLLER_H_ 5 #ifndef UI_WM_CORE_NESTED_ACCELERATOR_CONTROLLER_H_
6 #define ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_ 6 #define UI_WM_CORE_NESTED_ACCELERATOR_CONTROLLER_H_
7 7
8 #include "ash/ash_export.h"
9 #include "base/callback.h" 8 #include "base/callback.h"
10 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
11 #include "ui/wm/public/dispatcher_client.h" 10 #include "ui/wm/public/dispatcher_client.h"
11 #include "ui/wm/wm_export.h"
12 12
13 namespace ash { 13 namespace wm {
14 14
15 class AcceleratorDispatcher; 15 class NestedAcceleratorDelegate;
16 class NestedAcceleratorDispatcher;
16 17
17 // Creates a dispatcher which wraps another dispatcher. 18 // Creates a dispatcher which wraps another dispatcher.
18 // The outer dispatcher runs first and performs ash specific handling. 19 // The outer dispatcher runs first and performs ash specific handling.
19 // If it does not consume the event it forwards the event to the nested 20 // If it does not consume the event it forwards the event to the nested
20 // dispatcher. 21 // dispatcher.
21 class ASH_EXPORT NestedDispatcherController 22 class WM_EXPORT NestedAcceleratorController
22 : public aura::client::DispatcherClient { 23 : public aura::client::DispatcherClient {
23 public: 24 public:
24 NestedDispatcherController(); 25 explicit NestedAcceleratorController(NestedAcceleratorDelegate* delegate);
25 virtual ~NestedDispatcherController(); 26 virtual ~NestedAcceleratorController();
26 27
27 // aura::client::DispatcherClient: 28 // aura::client::DispatcherClient:
28 virtual void RunWithDispatcher( 29 virtual void RunWithDispatcher(
29 base::MessagePumpDispatcher* dispatcher) OVERRIDE; 30 base::MessagePumpDispatcher* dispatcher) OVERRIDE;
30 virtual void QuitNestedMessageLoop() OVERRIDE; 31 virtual void QuitNestedMessageLoop() OVERRIDE;
31 32
32 private: 33 private:
33 base::Closure quit_closure_; 34 base::Closure quit_closure_;
34 scoped_ptr<AcceleratorDispatcher> accelerator_dispatcher_; 35 scoped_ptr<NestedAcceleratorDispatcher> accelerator_dispatcher_;
36 scoped_ptr<NestedAcceleratorDelegate> dispatcher_delegate_;
35 37
36 DISALLOW_COPY_AND_ASSIGN(NestedDispatcherController); 38 DISALLOW_COPY_AND_ASSIGN(NestedAcceleratorController);
37 }; 39 };
38 40
39 } // namespace ash 41 } // namespace wm
40 42
41 #endif // ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_ 43 #endif // UI_WM_CORE_NESTED_ACCELERATOR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ui/wm/core/DEPS ('k') | ui/wm/core/nested_accelerator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698