// Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef DEVICE_VR_PUBLIC_CPP_XR_FRAME_SINK_CLIENT_H_ #define DEVICE_VR_PUBLIC_CPP_XR_FRAME_SINK_CLIENT_H_ #include <memory> #include <optional> #include "base/component_export.h" #include "base/functional/callback_forward.h" #include "services/viz/privileged/mojom/compositing/frame_sink_manager.mojom-forward.h" namespace viz { class FrameSinkId; class SurfaceId; } // namespace viz namespace device { // Helper enum used to describe if DOMOverlay should attempt to be setup, and if // it should, if initialization should fail if it is unable to be setup. enum DomOverlaySetup { … }; // There are a handful of methods to create/register RootCompositorFrameSinks // that must be run on the UI thread; however, the interfaces that need to be // called are restricted to //content. This interface is designed to allow // injection and encapsulation of those calls for XR Runtimes that are creating // a RootCompositorFrameSink. class COMPONENT_EXPORT(VR_PUBLIC_CPP) XrFrameSinkClient { … }; // This factory must be run on the UI thread, so that the XrFrameSinkClient can // be created and destroyed on the UI thread. XrFrameSinkClientFactory; } // namespace device #endif // DEVICE_VR_PUBLIC_CPP_XR_FRAME_SINK_CLIENT_H_