#ifndef WebSerializedOrigin_h
#define WebSerializedOrigin_h
#include "WebString.h"
#if INSIDE_BLINK
namespace WebCore { class SecurityOrigin; }
#else
#include <url/origin.h>
#endif
namespace blink {
class WebSerializedOrigin {
public:
WebSerializedOrigin() : m_string("null") { }
#if INSIDE_BLINK
BLINK_PLATFORM_EXPORT WebSerializedOrigin(const WebCore::SecurityOrigin&);
#else
WebSerializedOrigin(const url::Origin& origin) : m_string(WebString::fromUTF8(origin.string())) { }
operator url::Origin() const { return url::Origin(m_string.utf8()); }
#endif
const WebString& string() const
{
return m_string;
}
private:
const WebString m_string;
};
}
#endif