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

Side by Side Diff: third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerResponse.h

Issue 2892953006: WIP POC blob transport over mojo
Patch Set: pass mojo blobs over ipc Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/public/platform/blobs.mojom ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebServiceWorkerResponse_h 5 #ifndef WebServiceWorkerResponse_h
6 #define WebServiceWorkerResponse_h 6 #define WebServiceWorkerResponse_h
7 7
8 #include "public/platform/WebCommon.h" 8 #include "public/platform/WebCommon.h"
9 #include "public/platform/WebPrivatePtr.h" 9 #include "public/platform/WebPrivatePtr.h"
10 #include "public/platform/WebString.h" 10 #include "public/platform/WebString.h"
11 #include "public/platform/WebURL.h" 11 #include "public/platform/WebURL.h"
12 #include "public/platform/WebVector.h" 12 #include "public/platform/WebVector.h"
13 #include "public/platform/blobs.mojom.h"
13 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseError.h" 14 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseError.h"
14 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h" 15 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h"
15 16
16 #if INSIDE_BLINK 17 #if INSIDE_BLINK
17 #include "platform/wtf/Forward.h" 18 #include "platform/wtf/Forward.h"
18 #include "platform/wtf/HashMap.h" 19 #include "platform/wtf/HashMap.h"
19 #include "platform/wtf/text/StringHash.h" 20 #include "platform/wtf/text/StringHash.h"
20 #endif 21 #endif
21 22
22 namespace blink { 23 namespace blink {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // delimited) else creates a new entry. 63 // delimited) else creates a new entry.
63 void AppendHeader(const WebString& key, const WebString& value); 64 void AppendHeader(const WebString& key, const WebString& value);
64 65
65 WebVector<WebString> GetHeaderKeys() const; 66 WebVector<WebString> GetHeaderKeys() const;
66 WebString GetHeader(const WebString& key) const; 67 WebString GetHeader(const WebString& key) const;
67 void VisitHTTPHeaderFields(WebHTTPHeaderVisitor*) const; 68 void VisitHTTPHeaderFields(WebHTTPHeaderVisitor*) const;
68 69
69 void SetBlob(const WebString& uuid, uint64_t size); 70 void SetBlob(const WebString& uuid, uint64_t size);
70 WebString BlobUUID() const; 71 WebString BlobUUID() const;
71 uint64_t BlobSize() const; 72 uint64_t BlobSize() const;
73 storage::mojom::BlobPtr CloneBlob() const;
72 74
73 // Provides a more detailed error when status() is zero. 75 // Provides a more detailed error when status() is zero.
74 void SetError(WebServiceWorkerResponseError); 76 void SetError(WebServiceWorkerResponseError);
75 WebServiceWorkerResponseError GetError() const; 77 WebServiceWorkerResponseError GetError() const;
76 78
77 void SetResponseTime(int64_t); 79 void SetResponseTime(int64_t);
78 int64_t ResponseTime() const; 80 int64_t ResponseTime() const;
79 81
80 void SetCacheStorageCacheName(const WebString&); 82 void SetCacheStorageCacheName(const WebString&);
81 const WebString& CacheStorageCacheName() const; 83 const WebString& CacheStorageCacheName() const;
82 84
83 void SetCorsExposedHeaderNames(const WebVector<WebString>&); 85 void SetCorsExposedHeaderNames(const WebVector<WebString>&);
84 const WebVector<WebString>& CorsExposedHeaderNames() const; 86 const WebVector<WebString>& CorsExposedHeaderNames() const;
85 87
86 #if INSIDE_BLINK 88 #if INSIDE_BLINK
87 const HTTPHeaderMap& Headers() const; 89 const HTTPHeaderMap& Headers() const;
88 90
89 void SetBlobDataHandle(PassRefPtr<BlobDataHandle>); 91 void SetBlobDataHandle(PassRefPtr<BlobDataHandle>);
90 PassRefPtr<BlobDataHandle> GetBlobDataHandle() const; 92 PassRefPtr<BlobDataHandle> GetBlobDataHandle() const;
91 #endif 93 #endif
92 94
93 private: 95 private:
94 WebPrivatePtr<WebServiceWorkerResponsePrivate> private_; 96 WebPrivatePtr<WebServiceWorkerResponsePrivate> private_;
95 }; 97 };
96 98
97 } // namespace blink 99 } // namespace blink
98 100
99 #endif // WebServiceWorkerResponse_h 101 #endif // WebServiceWorkerResponse_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/blobs.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698