Update component_updater to use the new version of LaunchProcess.
[chromium-blink-merge.git] / athena / input / input_manager_impl.h
blobbfebc3415322a29dc40c817eba5418f6d144ef44
1 // Copyright 2014 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 ATHENA_INPUT_INPUT_MANAGER_IMPL_H_
6 #define ATHENA_INPUT_INPUT_MANAGER_IMPL_H_
8 #include "athena/input/public/input_manager.h"
10 #include "athena/athena_export.h"
11 #include "athena/input/accelerator_manager_impl.h"
12 #include "ui/aura/client/event_client.h"
13 #include "ui/events/event_target.h"
15 namespace athena {
16 class PowerButtonController;
18 namespace test {
19 class ScopedPowerButtonTimeoutShortener;
22 class ATHENA_EXPORT InputManagerImpl : public InputManager,
23 public ui::EventTarget,
24 public aura::client::EventClient {
25 public:
26 InputManagerImpl();
27 ~InputManagerImpl() override;
29 void Init();
30 void Shutdown();
32 private:
33 friend class test::ScopedPowerButtonTimeoutShortener;
35 // InputManager:
36 virtual void OnRootWindowCreated(aura::Window* root_window) override;
37 virtual ui::EventTarget* GetTopmostEventTarget() override;
38 virtual AcceleratorManager* GetAcceleratorManager() override;
39 virtual void AddPowerButtonObserver(PowerButtonObserver* observer) override;
40 virtual void RemovePowerButtonObserver(
41 PowerButtonObserver* observer) override;
43 // Overridden from aura::client::EventClient:
44 virtual bool CanProcessEventsWithinSubtree(
45 const aura::Window* window) const override;
46 virtual ui::EventTarget* GetToplevelEventTarget() override;
48 // ui::EventTarget:
49 virtual bool CanAcceptEvent(const ui::Event& event) override;
50 virtual ui::EventTarget* GetParentTarget() override;
51 virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override;
52 virtual ui::EventTargeter* GetEventTargeter() override;
53 virtual void OnEvent(ui::Event* event) override;
55 int SetPowerButtonTimeoutMsForTest(int timeout);
57 scoped_ptr<AcceleratorManagerImpl> accelerator_manager_;
58 scoped_ptr<PowerButtonController> power_button_controller_;
60 DISALLOW_COPY_AND_ASSIGN(InputManagerImpl);
63 } // namespace athena
65 #endif // ATHENA_INPUT_INPUT_MANAGER_IMPL_H_