blob: 61d6f531760a3d55eede18eab68272807887169e [file] [log] [blame]
// Copyright 2016 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.
namespace ui {
struct GamepadDevice;
} // namespace ui
namespace exo {
class Surface;
class GamepadDelegate;
class GamingSeat;
// It send gamepad_added event and generate the GamepadDelegate.
class GamingSeatDelegate {
// Gives the delegate a chance to clean up when the GamingSeat instance is
// destroyed
virtual void OnGamingSeatDestroying(GamingSeat* gaming_seat) = 0;
// This should return true if |surface| is a valid target for this gaming
// seat. E.g. the surface is owned by the same client as the gaming seat.
virtual bool CanAcceptGamepadEventsForSurface(Surface* surface) const = 0;
// When a new gamepad is connected, gaming seat call this to get the
// gamepad delegate.
virtual GamepadDelegate* GamepadAdded(const ui::GamepadDevice& device) = 0;
virtual ~GamingSeatDelegate() {}
} // namespace exo