| OLD | NEW |
| 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 CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_ | 5 #ifndef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_ |
| 6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_ | 6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 GURL url; | 136 GURL url; |
| 137 int status_code; | 137 int status_code; |
| 138 std::string status_text; | 138 std::string status_text; |
| 139 blink::WebServiceWorkerResponseType response_type; | 139 blink::WebServiceWorkerResponseType response_type; |
| 140 ServiceWorkerHeaderMap headers; | 140 ServiceWorkerHeaderMap headers; |
| 141 std::string blob_uuid; | 141 std::string blob_uuid; |
| 142 uint64 blob_size; | 142 uint64 blob_size; |
| 143 GURL stream_url; | 143 GURL stream_url; |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 // Controls how requests are matched in the Cache API. | |
| 147 struct CONTENT_EXPORT ServiceWorkerCacheQueryParams { | |
| 148 ServiceWorkerCacheQueryParams(); | |
| 149 | |
| 150 bool ignore_search; | |
| 151 bool ignore_method; | |
| 152 bool ignore_vary; | |
| 153 base::string16 cache_name; | |
| 154 }; | |
| 155 | |
| 156 // The type of a single batch operation in the Cache API. | |
| 157 enum ServiceWorkerCacheOperationType { | |
| 158 SERVICE_WORKER_CACHE_OPERATION_TYPE_UNDEFINED, | |
| 159 SERVICE_WORKER_CACHE_OPERATION_TYPE_PUT, | |
| 160 SERVICE_WORKER_CACHE_OPERATION_TYPE_DELETE, | |
| 161 SERVICE_WORKER_CACHE_OPERATION_TYPE_LAST = | |
| 162 SERVICE_WORKER_CACHE_OPERATION_TYPE_DELETE | |
| 163 }; | |
| 164 | |
| 165 // A single batch operation for the Cache API. | |
| 166 struct CONTENT_EXPORT ServiceWorkerBatchOperation { | |
| 167 ServiceWorkerBatchOperation(); | |
| 168 | |
| 169 ServiceWorkerCacheOperationType operation_type; | |
| 170 ServiceWorkerFetchRequest request; | |
| 171 ServiceWorkerResponse response; | |
| 172 ServiceWorkerCacheQueryParams match_params; | |
| 173 }; | |
| 174 | |
| 175 // Represents initialization info for a WebServiceWorker object. | 146 // Represents initialization info for a WebServiceWorker object. |
| 176 struct CONTENT_EXPORT ServiceWorkerObjectInfo { | 147 struct CONTENT_EXPORT ServiceWorkerObjectInfo { |
| 177 ServiceWorkerObjectInfo(); | 148 ServiceWorkerObjectInfo(); |
| 178 int handle_id; | 149 int handle_id; |
| 179 GURL url; | 150 GURL url; |
| 180 blink::WebServiceWorkerState state; | 151 blink::WebServiceWorkerState state; |
| 181 int64 version_id; | 152 int64 version_id; |
| 182 }; | 153 }; |
| 183 | 154 |
| 184 struct CONTENT_EXPORT ServiceWorkerRegistrationObjectInfo { | 155 struct CONTENT_EXPORT ServiceWorkerRegistrationObjectInfo { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 191 |
| 221 struct ServiceWorkerClientQueryOptions { | 192 struct ServiceWorkerClientQueryOptions { |
| 222 ServiceWorkerClientQueryOptions(); | 193 ServiceWorkerClientQueryOptions(); |
| 223 blink::WebServiceWorkerClientType client_type; | 194 blink::WebServiceWorkerClientType client_type; |
| 224 bool include_uncontrolled; | 195 bool include_uncontrolled; |
| 225 }; | 196 }; |
| 226 | 197 |
| 227 } // namespace content | 198 } // namespace content |
| 228 | 199 |
| 229 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_ | 200 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_ |
| OLD | NEW |