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

Side by Side Diff: Source/modules/serviceworkers/Response.cpp

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, 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/serviceworkers/Response.h ('k') | Source/modules/serviceworkers/Response.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "Response.h"
7
8 #include "bindings/v8/Dictionary.h"
9 #include "modules/serviceworkers/ResponseInit.h"
10 #include "platform/NotImplemented.h"
11
12 namespace WebCore {
13
14 PassRefPtr<Response> Response::create()
15 {
16 return create(Dictionary());
17 }
18
19 PassRefPtr<Response> Response::create(const Dictionary& responseInit)
20 {
21 return adoptRef(new Response(ResponseInit(responseInit)));
22 }
23
24 void Response::headers(const Dictionary& headers)
25 {
26 notImplemented();
27 }
28
29 Dictionary* Response::headers()
30 {
31 // FIXME: Implement. Spec will eventually whitelist allowable headers.
32 return &m_headers;
33 }
34
35 Response::Response(const ResponseInit& responseInit)
36 : m_statusCode(responseInit.statusCode)
37 , m_statusText(responseInit.statusText)
38 , m_method(responseInit.method)
39 , m_headers(responseInit.headers)
40 {
41 ScriptWrappable::init(this);
42 }
43
44 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/Response.h ('k') | Source/modules/serviceworkers/Response.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698