AVRoutePickerViewTargetPicker.h [plain text]
#pragma once
#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
#include "AVPlaybackTargetPicker.h"
OBJC_CLASS AVRouteDetector;
OBJC_CLASS AVRoutePickerView;
OBJC_CLASS WebAVRoutePickerViewHelper;
namespace WebCore {
class AVRoutePickerViewTargetPicker final : public AVPlaybackTargetPicker {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_NONCOPYABLE(AVRoutePickerViewTargetPicker);
public:
explicit AVRoutePickerViewTargetPicker(AVPlaybackTargetPicker::Client&);
virtual ~AVRoutePickerViewTargetPicker();
static bool isAvailable();
void availableDevicesDidChange();
void currentDeviceDidChange();
void devicePickerWasDismissed();
private:
void showPlaybackTargetPicker(NSView *, const FloatRect&, bool checkActiveRoute, bool useDarkAppearance) final;
void startingMonitoringPlaybackTargets() final;
void stopMonitoringPlaybackTargets() final;
void invalidatePlaybackTargets() final;
bool externalOutputDeviceAvailable() final;
AVOutputContext *outputContext() final;
AVRoutePickerView *devicePicker();
AVRouteDetector *routeDetector();
AVOutputContext * outputContextInternal();
bool hasActiveRoute() const;
RetainPtr<AVRouteDetector> m_routeDetector;
RetainPtr<AVRoutePickerView> m_routePickerView;
RetainPtr<AVOutputContext> m_outputContext;
RetainPtr<WebAVRoutePickerViewHelper> m_routePickerViewDelegate;
bool m_hadActiveRoute { false };
};
}
#endif // ENABLE(WIRELESS_PLAYBACK_TARGET)