blob: f4d9173ae3e9e5ffc62ba7cec761001552955081 [file] [log] [blame]
// 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 THIRD_PARTY_BLINK_RENDERER_MODULES_XR_XR_DEVICE_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_XR_XR_DEVICE_H_
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/wtf/forward.h"
namespace blink {
class XR;
class XRSessionCreationOptions;
// Temporary shell class that redirects all calls to XR. Only used to break
// removal CL into reasonably sized parts.
class XRDevice final : public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
XRDevice(XR*);
XR* xr() const { return xr_; }
ScriptPromise supportsSession(ScriptState*, const XRSessionCreationOptions*);
ScriptPromise requestSession(ScriptState*, const XRSessionCreationOptions*);
void Trace(blink::Visitor*) override;
private:
Member<XR> xr_;
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_XR_XR_DEVICE_H_