Chromium Code Reviews| Index: Source/modules/serviceworkers/Response.h |
| diff --git a/Source/modules/serviceworkers/Response.h b/Source/modules/serviceworkers/Response.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f55d3d54b3839005ff4b17e76915f5a43596c58f |
| --- /dev/null |
| +++ b/Source/modules/serviceworkers/Response.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef Response_h |
| +#define Response_h |
| + |
| +#include "bindings/v8/Dictionary.h" |
| +#include "bindings/v8/ScriptWrappable.h" |
| +#include "wtf/RefCounted.h" |
| +#include "wtf/text/WTFString.h" |
| + |
| +namespace WebCore { |
| + |
| +class Response FINAL : public ScriptWrappable, public RefCounted<Response> { |
| +public: |
| + static PassRefPtr<Response> create(); |
| + static PassRefPtr<Response> create(const Dictionary&); |
|
kinuko
2014/02/26 05:42:49
nit: can you also write the param name (responseIn
falken
2014/02/27 06:45:09
Done.
|
| + ~Response() { }; |
| + |
| + unsigned short statusCode() { return m_statusCode; } |
| + void setStatusCode(unsigned short statusCode) { m_statusCode = statusCode; } |
| + |
| + String statusText() { return m_statusText; } |
| + void setStatusText(const String& statusText) { m_statusText = statusText; } |
| + |
| + String method() { return m_method; } |
| + void setMethod(const String& method) { m_method = method; } |
| + |
| + Dictionary* headers(); |
| + void headers(const Dictionary&); |
| + |
| +private: |
| + Response(); |
| + unsigned short m_statusCode; |
| + String m_statusText; |
| + String m_method; |
| + Dictionary m_headers; |
| +}; |
| + |
| +} // namespace WebCore |
| + |
| +#endif // Response_h |