#ifndef WebMediaDevicesRequest_h
#define WebMediaDevicesRequest_h
#include "WebSecurityOrigin.h"
#include "public/platform/WebCommon.h"
#include "public/platform/WebPrivatePtr.h"
#include "public/platform/WebString.h"
namespace WebCore {
class MediaDevicesRequest;
}
namespace blink {
class WebDocument;
class WebMediaDeviceInfo;
template <typename T> class WebVector;
class WebMediaDevicesRequest {
public:
WebMediaDevicesRequest() { }
WebMediaDevicesRequest(const WebMediaDevicesRequest& request) { assign(request); }
~WebMediaDevicesRequest() { reset(); }
WebMediaDevicesRequest& operator=(const WebMediaDevicesRequest& other)
{
assign(other);
return *this;
}
BLINK_EXPORT void reset();
bool isNull() const { return m_private.isNull(); }
BLINK_EXPORT bool equals(const WebMediaDevicesRequest&) const;
BLINK_EXPORT void assign(const WebMediaDevicesRequest&);
BLINK_EXPORT WebSecurityOrigin securityOrigin() const;
BLINK_EXPORT WebDocument ownerDocument() const;
BLINK_EXPORT void requestSucceeded(WebVector<WebMediaDeviceInfo>);
#if BLINK_IMPLEMENTATION
WebMediaDevicesRequest(const PassRefPtr<WebCore::MediaDevicesRequest>&);
WebMediaDevicesRequest(WebCore::MediaDevicesRequest*);
operator WebCore::MediaDevicesRequest*() const;
#endif
private:
WebPrivatePtr<WebCore::MediaDevicesRequest> m_private;
};
inline bool operator==(const WebMediaDevicesRequest& a, const WebMediaDevicesRequest& b)
{
return a.equals(b);
}
}
#endif