blob: 920133113bc53ca4dcb022d975fa2ef78d02f70d [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.
#include "modules/xr/XRSessionEvent.h"
namespace blink {
XRSessionEvent::XRSessionEvent() = default;
XRSessionEvent::XRSessionEvent(const AtomicString& type, XRSession* session)
: Event(type, true, false), session_(session) {}
XRSessionEvent::XRSessionEvent(const AtomicString& type,
const XRSessionEventInit& initializer)
: Event(type, initializer) {
if (initializer.hasSession())
session_ = initializer.session();
}
XRSessionEvent::~XRSessionEvent() = default;
const AtomicString& XRSessionEvent::InterfaceName() const {
return EventNames::XRSessionEvent;
}
void XRSessionEvent::Trace(blink::Visitor* visitor) {
visitor->Trace(session_);
Event::Trace(visitor);
}
} // namespace blink