Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2147)

Unified Diff: Source/modules/serviceworkers/Response.h

Issue 180843003: Start to implement FetchEvent for ServiceWorker (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: patch for landing Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/serviceworkers/RespondWithObserver.cpp ('k') | Source/modules/serviceworkers/Response.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..10691b17bdd0a5f0a628bd7e3f0589c815cfabec
--- /dev/null
+++ b/Source/modules/serviceworkers/Response.h
@@ -0,0 +1,45 @@
+// 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 {
+
+struct ResponseInit;
+
+class Response FINAL : public ScriptWrappable, public RefCounted<Response> {
+public:
+ static PassRefPtr<Response> create();
+ static PassRefPtr<Response> create(const Dictionary& responseInit);
+ ~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:
+ explicit Response(const ResponseInit&);
+ unsigned short m_statusCode;
+ String m_statusText;
+ String m_method;
+ Dictionary m_headers;
+};
+
+} // namespace WebCore
+
+#endif // Response_h
« no previous file with comments | « Source/modules/serviceworkers/RespondWithObserver.cpp ('k') | Source/modules/serviceworkers/Response.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698