| Index: components/exo/gaming_seat_ozone.h
|
| diff --git a/components/exo/gaming_seat_ozone.h b/components/exo/gaming_seat_ozone.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..91d9f7ec6436fff64d12b92af4f6d8c3fe679a8f
|
| --- /dev/null
|
| +++ b/components/exo/gaming_seat_ozone.h
|
| @@ -0,0 +1,54 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_EXO_GAMING_SEAT_OZONE_H_
|
| +#define COMPONENTS_EXO_GAMING_SEAT_OZONE_H_
|
| +
|
| +#include <memory>
|
| +
|
| +#include "base/macros.h"
|
| +#include "components/exo/gaming_seat.h"
|
| +#include "components/exo/wm_helper.h"
|
| +#include "ui/events/ozone/gamepad/gamepad_observer.h"
|
| +
|
| +namespace ui {
|
| +class GamepadProviderOzone;
|
| +}
|
| +
|
| +namespace exo {
|
| +class GamingSeatDelegate;
|
| +class GamepadDelegate;
|
| +
|
| +class GamingSeatOzone : public GamingSeat, public ui::GamepadObserver {
|
| + public:
|
| + GamingSeatOzone(GamingSeatDelegate* delegate);
|
| +
|
| + ~GamingSeatOzone() override;
|
| +
|
| + // Overriden ui::GamepadObserver.
|
| + void OnGamepadDevicesUpdated() override;
|
| + void OnGamepadEvent(const ui::GamepadEvent& event) override;
|
| +
|
| + // Overridden WMHelper::FocusObserver:
|
| + void OnWindowFocused(aura::Window* gained_focus,
|
| + aura::Window* lost_focus) override;
|
| +
|
| + private:
|
| + // Enable or disable this gaming seat.
|
| + void Enable(bool enable);
|
| +
|
| + // The delegate that handles gamepad_added.
|
| + GamingSeatDelegate* const delegate_;
|
| +
|
| + // This map maps device id to gamepad delegates.
|
| + std::map<int, GamepadDelegate*> gamepads_;
|
| +
|
| + ui::GamepadProviderOzone* gamepad_provider_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(GamingSeatOzone);
|
| +};
|
| +
|
| +} // namespace exo
|
| +
|
| +#endif // COMPONENTS_EXO_GAMING_SEAT_JOYDEV_H_
|
|
|