| Index: content/public/browser/blob_context.h
|
| diff --git a/content/public/browser/blob_context.h b/content/public/browser/blob_context.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1eb35a1120e3bc04ea90ac4f703e57472af17749
|
| --- /dev/null
|
| +++ b/content/public/browser/blob_context.h
|
| @@ -0,0 +1,29 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_PUBLIC_BROWSER_BLOB_CONTEXT_H_
|
| +#define CONTENT_PUBLIC_BROWSER_BLOB_CONTEXT_H_
|
| +
|
| +#include "base/callback_forward.h"
|
| +
|
| +namespace content {
|
| +
|
| +class BlobHandle;
|
| +
|
| +// Used to coin Blobs in the browser process. For use on the UI thread.
|
| +class BlobContext {
|
| + public:
|
| + typedef base::Callback<void(scoped_ptr<BlobHandle>)> BlobCallback;
|
| +
|
| + // |callback| call return NULL on failure.
|
| + virtual void CreateMemoryBackedBlob(
|
| + const char* data, size_t length, const BlobCallback& callback) = 0;
|
| +
|
| + protected:
|
| + virtual ~BlobContext() {}
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_PUBLIC_BROWSER_BLOB_CONTEXT_H_
|
|
|