1 // Copyright 2013 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.
5 #ifndef CONTENT_CHILD_WEBBLOBREGISTRY_IMPL_H_
6 #define CONTENT_CHILD_WEBBLOBREGISTRY_IMPL_H_
10 #include "base/memory/ref_counted.h"
11 #include "third_party/WebKit/public/platform/WebBlobRegistry.h"
14 class ThreadSafeSender
;
16 class WebBlobRegistryImpl
: public blink::WebBlobRegistry
{
18 explicit WebBlobRegistryImpl(ThreadSafeSender
* sender
);
19 virtual ~WebBlobRegistryImpl();
21 virtual void registerBlobData(const blink::WebString
& uuid
,
22 const blink::WebBlobData
& data
);
23 virtual void addBlobDataRef(const blink::WebString
& uuid
);
24 virtual void removeBlobDataRef(const blink::WebString
& uuid
);
25 virtual void registerPublicBlobURL(const blink::WebURL
&,
26 const blink::WebString
& uuid
);
27 virtual void revokePublicBlobURL(const blink::WebURL
&);
29 // Additional support for Streams.
30 virtual void registerStreamURL(const blink::WebURL
& url
,
31 const blink::WebString
& content_type
);
32 virtual void registerStreamURL(const blink::WebURL
& url
,
33 const blink::WebURL
& src_url
);
34 virtual void addDataToStream(const blink::WebURL
& url
,
35 blink::WebThreadSafeData
& data
);
36 virtual void finalizeStream(const blink::WebURL
& url
);
37 virtual void abortStream(const blink::WebURL
& url
);
38 virtual void unregisterStreamURL(const blink::WebURL
& url
);
41 void SendDataForBlob(const std::string
& uuid_str
,
42 const blink::WebThreadSafeData
& data
);
44 scoped_refptr
<ThreadSafeSender
> sender_
;
47 } // namespace content
49 #endif // CONTENT_CHILD_FILEAPI_WEBBLOBREGISTRY_IMPL_H_