blob: 4faa7358541cd7c5b56f560bb0838375125c8195 [file] [log] [blame]
// Copyright 2015 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 DEVICE_VR_OCULUS_VR_DEVICE_PROVIDER_H
#define DEVICE_VR_OCULUS_VR_DEVICE_PROVIDER_H
#include <map>
#include "device/vr/vr_device.h"
#include "device/vr/vr_device_provider.h"
struct ovrHmdStruct;
namespace device {
class GamepadConsumer;
class OculusVRDeviceProvider : public VRDeviceProvider {
public:
OculusVRDeviceProvider();
~OculusVRDeviceProvider() override;
void GetDevices(std::vector<VRDevice*>* devices) override;
void Initialize() override;
bool MayHaveDevices() override;
void PollEvents() override;
private:
void Shutdown();
bool EnsureDeviceCreated();
bool initialized_;
VRDevice* device_; // Oculus API only supports one device
GamepadConsumer* gamepad_consumer_;
};
} // namespace device
#endif // DEVICE_VR_OCULUS_VR_DEVICE_PROVIDER_H