Chromium Code Reviews| 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 #include "content/common/content_export.h" | |
| 10 | |
| 11 namespace content { | |
| 12 | |
| 13 // A handle to Blobs that can be stored outside of content/. | |
| 14 class BlobHandle { | |
| 15 public: | |
| 16 virtual ~BlobHandle() {} | |
| 17 virtual std::string uuid() = 0; | |
| 18 | |
| 19 protected: | |
| 20 BlobHandle() {} | |
| 21 | |
| 22 DISALLOW_COPY_AND_ASSIGN(BlobHandle); | |
| 23 }; | |
| 24 | |
| 25 // Used to coin Blobs in the browser process. For use on the UI thread. | |
| 26 class CONTENT_EXPORT BlobContext { | |
|
michaeln
2014/05/08 23:03:18
i'm not sure when CONTENT_EXPORT is needed and whe
tommycli
2014/05/09 16:10:17
Done.
| |
| 27 public: | |
| 28 typedef base::Callback<void(scoped_ptr<BlobHandle>)> BlobCallback; | |
| 29 | |
| 30 virtual void CreateMemoryBackedBlob( | |
| 31 const char* data, size_t length, const BlobCallback& callback) = 0; | |
| 32 | |
| 33 protected: | |
| 34 virtual ~BlobContext() {} | |
| 35 }; | |
| 36 | |
| 37 } // namespace content | |
| 38 | |
| 39 #endif // CONTENT_PUBLIC_BROWSER_BLOB_CONTEXT_H_ | |
| OLD | NEW |