This source file includes following definitions.
- create
- create
- headers
- headers
- populateWebServiceWorkerResponse
- m_headers
#include "config.h"
#include "Response.h"
#include "bindings/v8/Dictionary.h"
#include "modules/serviceworkers/ResponseInit.h"
#include "platform/NotImplemented.h"
#include "public/platform/WebServiceWorkerResponse.h"
namespace WebCore {
PassRefPtr<Response> Response::create()
{
return create(Dictionary());
}
PassRefPtr<Response> Response::create(const Dictionary& responseInit)
{
return adoptRef(new Response(ResponseInit(responseInit)));
}
void Response::headers(const Dictionary& headers)
{
notImplemented();
}
Dictionary* Response::headers()
{
return &m_headers;
}
void Response::populateWebServiceWorkerResponse(blink::WebServiceWorkerResponse& response)
{
response.setStatusCode(statusCode());
response.setStatusText(statusText());
response.setMethod(method());
}
Response::Response(const ResponseInit& responseInit)
: m_statusCode(responseInit.statusCode)
, m_statusText(responseInit.statusText)
, m_method(responseInit.method)
, m_headers(responseInit.headers)
{
ScriptWrappable::init(this);
}
}