OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_BLOB_CONTEXT_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_BLOB_CONTEXT_H_ |
| 7 |
| 8 #include "base/callback_forward.h" |
| 9 |
| 10 namespace content { |
| 11 |
| 12 class BlobHandle; |
| 13 |
| 14 // Used to coin Blobs in the browser process. For use on the UI thread. |
| 15 class BlobContext { |
| 16 public: |
| 17 typedef base::Callback<void(scoped_ptr<BlobHandle>)> BlobCallback; |
| 18 |
| 19 // |callback| call return NULL on failure. |
| 20 virtual void CreateMemoryBackedBlob( |
| 21 const char* data, size_t length, const BlobCallback& callback) = 0; |
| 22 |
| 23 protected: |
| 24 virtual ~BlobContext() {} |
| 25 }; |
| 26 |
| 27 } // namespace content |
| 28 |
| 29 #endif // CONTENT_PUBLIC_BROWSER_BLOB_CONTEXT_H_ |
OLD | NEW |