OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 const String& contentType); | 75 const String& contentType); |
76 | 76 |
77 ~Blob() override; | 77 ~Blob() override; |
78 | 78 |
79 virtual unsigned long long size() const { return m_blobDataHandle->size(); } | 79 virtual unsigned long long size() const { return m_blobDataHandle->size(); } |
80 virtual Blob* slice(long long start, | 80 virtual Blob* slice(long long start, |
81 long long end, | 81 long long end, |
82 const String& contentType, | 82 const String& contentType, |
83 ExceptionState&) const; | 83 ExceptionState&) const; |
84 | 84 |
85 // To allow ExceptionState to be passed in last, manually enumerate the option
al argument overloads. | 85 // To allow ExceptionState to be passed in last, manually enumerate the |
| 86 // optional argument overloads. |
86 Blob* slice(ExceptionState& exceptionState) const { | 87 Blob* slice(ExceptionState& exceptionState) const { |
87 return slice(0, std::numeric_limits<long long>::max(), String(), | 88 return slice(0, std::numeric_limits<long long>::max(), String(), |
88 exceptionState); | 89 exceptionState); |
89 } | 90 } |
90 Blob* slice(long long start, ExceptionState& exceptionState) const { | 91 Blob* slice(long long start, ExceptionState& exceptionState) const { |
91 return slice(start, std::numeric_limits<long long>::max(), String(), | 92 return slice(start, std::numeric_limits<long long>::max(), String(), |
92 exceptionState); | 93 exceptionState); |
93 } | 94 } |
94 Blob* slice(long long start, | 95 Blob* slice(long long start, |
95 long long end, | 96 long long end, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 private: | 134 private: |
134 Blob(); | 135 Blob(); |
135 | 136 |
136 RefPtr<BlobDataHandle> m_blobDataHandle; | 137 RefPtr<BlobDataHandle> m_blobDataHandle; |
137 bool m_isClosed; | 138 bool m_isClosed; |
138 }; | 139 }; |
139 | 140 |
140 } // namespace blink | 141 } // namespace blink |
141 | 142 |
142 #endif // Blob_h | 143 #endif // Blob_h |
OLD | NEW |