#include <memory>
#include "content/browser/xr/metrics/session_metrics_helper.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/metrics/histogram_macros.h"
#include "content/browser/xr/metrics/session_timer.h"
#include "content/browser/xr/metrics/webxr_session_tracker.h"
#include "content/browser/xr/service/xr_runtime_manager_impl.h"
#include "content/browser/xr/webxr_internals/mojom/webxr_internals.mojom.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/web_contents.h"
#include "device/vr/public/cpp/session_mode.h"
namespace content {
namespace {
const void* const kSessionMetricsHelperDataKey = …;
class SessionMetricsHelperData : public base::SupportsUserData::Data { … };
void ReportInitialSessionData(
WebXRSessionTracker* webxr_session_tracker,
const device::mojom::XRSessionOptions& session_options,
const std::unordered_set<device::mojom::XRSessionFeature>&
enabled_features) { … }
}
SessionMetricsHelper* SessionMetricsHelper::FromWebContents(
content::WebContents* web_contents) { … }
SessionMetricsHelper* SessionMetricsHelper::CreateForWebContents(
content::WebContents* contents) { … }
SessionMetricsHelper::SessionMetricsHelper(content::WebContents* contents) { … }
SessionMetricsHelper::~SessionMetricsHelper() { … }
mojo::PendingRemote<device::mojom::XRSessionMetricsRecorder>
SessionMetricsHelper::StartInlineSession(
const device::mojom::XRSessionOptions& session_options,
const std::unordered_set<device::mojom::XRSessionFeature>& enabled_features,
size_t session_id) { … }
void SessionMetricsHelper::StopAndRecordInlineSession(size_t session_id) { … }
mojo::PendingRemote<device::mojom::XRSessionMetricsRecorder>
SessionMetricsHelper::StartImmersiveSession(
const device::mojom::XRDeviceId& runtime_id,
const device::mojom::XRSessionOptions& session_options,
const std::unordered_set<device::mojom::XRSessionFeature>&
enabled_features) { … }
void SessionMetricsHelper::StopAndRecordImmersiveSession() { … }
void SessionMetricsHelper::PrimaryPageChanged(content::Page& page) { … }
}