| 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 26 matching lines...) Expand all Loading... |
| 37 #include <wtf/PassOwnPtr.h> | 37 #include <wtf/PassOwnPtr.h> |
| 38 | 38 |
| 39 using namespace WebCore; | 39 using namespace WebCore; |
| 40 | 40 |
| 41 namespace WebKit { | 41 namespace WebKit { |
| 42 | 42 |
| 43 WebBlob WebBlob::createFromFile(const WebString& path, long long size) | 43 WebBlob WebBlob::createFromFile(const WebString& path, long long size) |
| 44 { | 44 { |
| 45 OwnPtr<BlobData> blobData = BlobData::create(); | 45 OwnPtr<BlobData> blobData = BlobData::create(); |
| 46 blobData->appendFile(path); | 46 blobData->appendFile(path); |
| 47 RefPtr<Blob> blob = Blob::create(blobData.release(), size); | 47 RefPtr<Blob> blob = Blob::create(BlobDataHandle::create(blobData.release(),
size)); |
| 48 return WebBlob(blob); | 48 return WebBlob(blob); |
| 49 } | 49 } |
| 50 | 50 |
| 51 void WebBlob::reset() | 51 void WebBlob::reset() |
| 52 { | 52 { |
| 53 m_private.reset(); | 53 m_private.reset(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void WebBlob::assign(const WebBlob& other) | 56 void WebBlob::assign(const WebBlob& other) |
| 57 { | 57 { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 77 m_private = blob; | 77 m_private = blob; |
| 78 return *this; | 78 return *this; |
| 79 } | 79 } |
| 80 | 80 |
| 81 WebBlob::operator WTF::PassRefPtr<WebCore::Blob>() const | 81 WebBlob::operator WTF::PassRefPtr<WebCore::Blob>() const |
| 82 { | 82 { |
| 83 return m_private.get(); | 83 return m_private.get(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace WebKit | 86 } // namespace WebKit |
| OLD | NEW |