OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_GLUE_RESOURCE_REQUEST_BODY_H_ | 5 #ifndef WEBKIT_GLUE_RESOURCE_REQUEST_BODY_H_ |
6 #define WEBKIT_GLUE_RESOURCE_REQUEST_BODY_H_ | 6 #define WEBKIT_GLUE_RESOURCE_REQUEST_BODY_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/supports_user_data.h" | 12 #include "base/supports_user_data.h" |
13 #include "webkit/base/data_element.h" | 13 #include "webkit/base/data_element.h" |
14 #include "webkit/glue/webkit_glue_export.h" | 14 #include "webkit/glue/webkit_glue_export.h" |
15 | 15 |
| 16 namespace fileapi { |
| 17 class FileSystemContext; |
| 18 } |
| 19 |
16 namespace net { | 20 namespace net { |
17 class UploadDataStream; | 21 class UploadDataStream; |
18 } | 22 } |
19 | 23 |
20 namespace webkit_blob { | 24 namespace webkit_blob { |
21 class BlobStorageController; | 25 class BlobStorageController; |
22 } | 26 } |
23 | 27 |
24 namespace webkit_glue { | 28 namespace webkit_glue { |
25 | 29 |
(...skipping 12 matching lines...) Expand all Loading... |
38 uint64 offset, uint64 length, | 42 uint64 offset, uint64 length, |
39 const base::Time& expected_modification_time); | 43 const base::Time& expected_modification_time); |
40 void AppendBlob(const GURL& blob_url); | 44 void AppendBlob(const GURL& blob_url); |
41 void AppendFileSystemFileRange(const GURL& url, uint64 offset, uint64 length, | 45 void AppendFileSystemFileRange(const GURL& url, uint64 offset, uint64 length, |
42 const base::Time& expected_modification_time); | 46 const base::Time& expected_modification_time); |
43 | 47 |
44 // Creates a new UploadDataStream from this request body. This also resolves | 48 // Creates a new UploadDataStream from this request body. This also resolves |
45 // any blob references using given |blob_controller|. | 49 // any blob references using given |blob_controller|. |
46 // TODO(kinuko): Clean up this hack. | 50 // TODO(kinuko): Clean up this hack. |
47 net::UploadDataStream* ResolveElementsAndCreateUploadDataStream( | 51 net::UploadDataStream* ResolveElementsAndCreateUploadDataStream( |
48 webkit_blob::BlobStorageController* blob_controller); | 52 webkit_blob::BlobStorageController* blob_controller, |
| 53 fileapi::FileSystemContext* file_system_context); |
49 | 54 |
50 const std::vector<Element>* elements() const { return &elements_; } | 55 const std::vector<Element>* elements() const { return &elements_; } |
51 std::vector<Element>* elements_mutable() { return &elements_; } | 56 std::vector<Element>* elements_mutable() { return &elements_; } |
52 void swap_elements(std::vector<Element>* elements) { | 57 void swap_elements(std::vector<Element>* elements) { |
53 elements_.swap(*elements); | 58 elements_.swap(*elements); |
54 } | 59 } |
55 | 60 |
56 // Identifies a particular upload instance, which is used by the cache to | 61 // Identifies a particular upload instance, which is used by the cache to |
57 // formulate a cache key. This value should be unique across browser | 62 // formulate a cache key. This value should be unique across browser |
58 // sessions. A value of 0 is used to indicate an unspecified identifier. | 63 // sessions. A value of 0 is used to indicate an unspecified identifier. |
(...skipping 12 matching lines...) Expand all Loading... |
71 | 76 |
72 std::vector<Element> elements_; | 77 std::vector<Element> elements_; |
73 int64 identifier_; | 78 int64 identifier_; |
74 | 79 |
75 DISALLOW_COPY_AND_ASSIGN(ResourceRequestBody); | 80 DISALLOW_COPY_AND_ASSIGN(ResourceRequestBody); |
76 }; | 81 }; |
77 | 82 |
78 } // namespace webkit_glue | 83 } // namespace webkit_glue |
79 | 84 |
80 #endif // WEBKIT_GLUE_RESOURCE_REQUEST_BODY_H_ | 85 #endif // WEBKIT_GLUE_RESOURCE_REQUEST_BODY_H_ |
OLD | NEW |