Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 13 matching lines...) Expand all Loading... | |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebBlob_h | 31 #ifndef WebBlob_h |
| 32 #define WebBlob_h | 32 #define WebBlob_h |
| 33 | 33 |
| 34 #include "../platform/WebBlobData.h" | |
|
kinuko
2013/09/30 11:31:53
ditto. Is this change necessary?
michaeln
2013/09/30 20:50:24
Yes, this ensures code compiled against this .h fi
| |
| 34 #include "../platform/WebCommon.h" | 35 #include "../platform/WebCommon.h" |
| 35 #include "../platform/WebPrivatePtr.h" | 36 #include "../platform/WebPrivatePtr.h" |
| 36 #include "../platform/WebString.h" | 37 #include "../platform/WebString.h" |
| 37 #include "../platform/WebURL.h" | 38 #include "../platform/WebURL.h" |
| 38 | 39 |
| 39 namespace v8 { | 40 namespace v8 { |
| 40 class Value; | 41 class Value; |
| 41 template <class T> class Handle; | 42 template <class T> class Handle; |
| 42 } | 43 } |
| 43 | 44 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 55 { | 56 { |
| 56 assign(b); | 57 assign(b); |
| 57 return *this; | 58 return *this; |
| 58 } | 59 } |
| 59 | 60 |
| 60 BLINK_EXPORT static WebBlob createFromFile(const WebString& path, long long size); | 61 BLINK_EXPORT static WebBlob createFromFile(const WebString& path, long long size); |
| 61 BLINK_EXPORT static WebBlob fromV8Value(v8::Handle<v8::Value>); | 62 BLINK_EXPORT static WebBlob fromV8Value(v8::Handle<v8::Value>); |
| 62 | 63 |
| 63 BLINK_EXPORT void reset(); | 64 BLINK_EXPORT void reset(); |
| 64 BLINK_EXPORT void assign(const WebBlob&); | 65 BLINK_EXPORT void assign(const WebBlob&); |
| 65 BLINK_EXPORT WebURL url(); | 66 BLINK_EXPORT WebString uuid(); |
| 66 | 67 |
| 67 bool isNull() const { return m_private.isNull(); } | 68 bool isNull() const { return m_private.isNull(); } |
| 68 | 69 |
| 69 BLINK_EXPORT v8::Handle<v8::Value> toV8Value(); | 70 BLINK_EXPORT v8::Handle<v8::Value> toV8Value(); |
| 70 | 71 |
| 71 #if BLINK_IMPLEMENTATION | 72 #if BLINK_IMPLEMENTATION |
| 72 WebBlob(const WTF::PassRefPtr<WebCore::Blob>&); | 73 WebBlob(const WTF::PassRefPtr<WebCore::Blob>&); |
| 73 WebBlob& operator=(const WTF::PassRefPtr<WebCore::Blob>&); | 74 WebBlob& operator=(const WTF::PassRefPtr<WebCore::Blob>&); |
| 74 operator WTF::PassRefPtr<WebCore::Blob>() const; | 75 operator WTF::PassRefPtr<WebCore::Blob>() const; |
| 75 #endif | 76 #endif |
| 76 | 77 |
| 77 protected: | 78 protected: |
| 78 WebPrivatePtr<WebCore::Blob> m_private; | 79 WebPrivatePtr<WebCore::Blob> m_private; |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace WebKit | 82 } // namespace WebKit |
| 82 | 83 |
| 83 #endif // WebBlob_h | 84 #endif // WebBlob_h |
| OLD | NEW |