Revert of Add nacl_loader_unittests to the chromium_builder_tests (https://codereview...
[chromium-blink-merge.git] / ash / accelerators / nested_dispatcher_controller.h
blobebac2d2f03a6e73a6815a552ff24fc1d939d85c2
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.
5 #ifndef ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_
6 #define ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_
8 #include "ash/ash_export.h"
9 #include "base/callback.h"
10 #include "base/message_loop/message_loop.h"
11 #include "ui/wm/public/dispatcher_client.h"
13 namespace ash {
15 class AcceleratorDispatcher;
17 // Creates a dispatcher which wraps another dispatcher.
18 // 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 // dispatcher.
21 class ASH_EXPORT NestedDispatcherController
22 : public aura::client::DispatcherClient {
23 public:
24 NestedDispatcherController();
25 virtual ~NestedDispatcherController();
27 // aura::client::DispatcherClient:
28 virtual void RunWithDispatcher(
29 base::MessagePumpDispatcher* dispatcher) OVERRIDE;
30 virtual void QuitNestedMessageLoop() OVERRIDE;
32 private:
33 base::Closure quit_closure_;
34 scoped_ptr<AcceleratorDispatcher> accelerator_dispatcher_;
36 DISALLOW_COPY_AND_ASSIGN(NestedDispatcherController);
39 } // namespace ash
41 #endif // ASH_ACCELERATORS_NESTED_DISPATCHER_CONTROLLER_H_