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

Unified Diff: public/platform/WebServiceWorkerResponse.h

Issue 185423005: Add more plumbing for FetchEvent including WebServiceWorkerResponse (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: BLINK_EXPORT -> BLINK_PLATFORM_EXPORT Created 6 years, 9 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/web/ServiceWorkerGlobalScopeProxy.cpp ('k') | public/web/WebServiceWorkerContextClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebServiceWorkerResponse.h
diff --git a/public/platform/WebServiceWorkerResponse.h b/public/platform/WebServiceWorkerResponse.h
new file mode 100644
index 0000000000000000000000000000000000000000..e0d287fd9bd06ca68b36a7617cbd2c3eb445f914
--- /dev/null
+++ b/public/platform/WebServiceWorkerResponse.h
@@ -0,0 +1,38 @@
+// 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 WebServiceWorkerResponse_h
+#define WebServiceWorkerResponse_h
+
+#include "public/platform/WebPrivatePtr.h"
+#include "public/platform/WebString.h"
+#include "public/platform/WebVector.h"
+
+namespace blink {
+
+// Represents a response to a fetch operation. ServiceWorker uses this to
+// respond to a FetchEvent dispatched by the browser. The plan is for the Cache
+// and fetch() API to also use it.
+class BLINK_PLATFORM_EXPORT WebServiceWorkerResponse {
+public:
+ void setStatusCode(unsigned short);
+ unsigned short statusCode() const;
+
+ void setStatusText(const WebString&);
+ WebString statusText() const;
+
+ void setMethod(const WebString&);
+ WebString method() const;
+
+ // FIXME: Eventually this should have additional methods such as for headers and blob.
+
+private:
+ unsigned short m_statusCode;
+ WebString m_statusText;
+ WebString m_method;
+};
+
+} // namespace blink
+
+#endif // WebServiceWorkerResponse_h
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.cpp ('k') | public/web/WebServiceWorkerContextClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698