| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #ifndef WebBlobData_h | 31 #ifndef WebBlobData_h |
| 32 #define WebBlobData_h | 32 #define WebBlobData_h |
| 33 | 33 |
| 34 #include "WebNonCopyable.h" | 34 #include "WebNonCopyable.h" |
| 35 #include "WebPrivateOwnPtr.h" | 35 #include "WebPrivateOwnPtr.h" |
| 36 #include "WebString.h" | 36 #include "WebString.h" |
| 37 #include "WebThreadSafeData.h" | 37 #include "WebThreadSafeData.h" |
| 38 #include "WebURL.h" | 38 #include "WebURL.h" |
| 39 | 39 |
| 40 namespace WebCore { class BlobData; } | 40 namespace blink { class BlobData; } |
| 41 #if INSIDE_BLINK | 41 #if INSIDE_BLINK |
| 42 namespace WTF { template <typename T> class PassOwnPtr; } | 42 namespace WTF { template <typename T> class PassOwnPtr; } |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 namespace blink { | 45 namespace blink { |
| 46 | 46 |
| 47 class WebBlobData : public WebNonCopyable { | 47 class WebBlobData : public WebNonCopyable { |
| 48 public: | 48 public: |
| 49 struct Item { | 49 struct Item { |
| 50 enum { TypeData, TypeFile, TypeBlob, TypeFileSystemURL } type; | 50 enum { TypeData, TypeFile, TypeBlob, TypeFileSystemURL } type; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 65 // Returns the number of items. | 65 // Returns the number of items. |
| 66 BLINK_PLATFORM_EXPORT size_t itemCount() const; | 66 BLINK_PLATFORM_EXPORT size_t itemCount() const; |
| 67 | 67 |
| 68 // Retrieves the values of the item at the given index. Returns false if | 68 // Retrieves the values of the item at the given index. Returns false if |
| 69 // index is out of bounds. | 69 // index is out of bounds. |
| 70 BLINK_PLATFORM_EXPORT bool itemAt(size_t index, Item& result) const; | 70 BLINK_PLATFORM_EXPORT bool itemAt(size_t index, Item& result) const; |
| 71 | 71 |
| 72 BLINK_PLATFORM_EXPORT WebString contentType() const; | 72 BLINK_PLATFORM_EXPORT WebString contentType() const; |
| 73 | 73 |
| 74 #if INSIDE_BLINK | 74 #if INSIDE_BLINK |
| 75 BLINK_PLATFORM_EXPORT WebBlobData(const WTF::PassOwnPtr<WebCore::BlobData>&)
; | 75 BLINK_PLATFORM_EXPORT WebBlobData(const WTF::PassOwnPtr<blink::BlobData>&); |
| 76 BLINK_PLATFORM_EXPORT WebBlobData& operator=(const WTF::PassOwnPtr<WebCore::
BlobData>&); | 76 BLINK_PLATFORM_EXPORT WebBlobData& operator=(const WTF::PassOwnPtr<blink::Bl
obData>&); |
| 77 BLINK_PLATFORM_EXPORT operator WTF::PassOwnPtr<WebCore::BlobData>(); | 77 BLINK_PLATFORM_EXPORT operator WTF::PassOwnPtr<blink::BlobData>(); |
| 78 #endif | 78 #endif |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 WebPrivateOwnPtr<WebCore::BlobData> m_private; | 81 WebPrivateOwnPtr<blink::BlobData> m_private; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 } // namespace blink | 84 } // namespace blink |
| 85 | 85 |
| 86 #endif // WebBlobData_h | 86 #endif // WebBlobData_h |
| OLD | NEW |