blob: 6588a5290735268ed998c96b09545e1a94f84ef4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// Copyright 2013 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_CHILD_FILEAPI_WEBBLOBREGISTRY_IMPL_H_
#define CONTENT_CHILD_FILEAPI_WEBBLOBREGISTRY_IMPL_H_
#include "base/memory/ref_counted.h"
#include "third_party/WebKit/public/platform/WebBlobRegistry.h"
#include "webkit/common/blob/blob_data.h"
namespace blink {
class WebBlobData;
class WebString;
class WebThreadSafeData;
class WebURL;
}
namespace content {
class ThreadSafeSender;
class WebBlobRegistryImpl : public blink::WebBlobRegistry {
public:
explicit WebBlobRegistryImpl(ThreadSafeSender* sender);
virtual ~WebBlobRegistryImpl();
virtual void registerBlobData(const blink::WebString& uuid,
const blink::WebBlobData& data);
virtual void addBlobDataRef(const blink::WebString& uuid);
virtual void removeBlobDataRef(const blink::WebString& uuid);
virtual void registerPublicBlobURL(const blink::WebURL&,
const blink::WebString& uuid);
virtual void revokePublicBlobURL(const blink::WebURL&);
// Additional support for Streams.
virtual void registerStreamURL(const blink::WebURL& url,
const blink::WebString& content_type);
virtual void registerStreamURL(const blink::WebURL& url,
const blink::WebURL& src_url);
virtual void addDataToStream(const blink::WebURL& url,
blink::WebThreadSafeData& data);
virtual void finalizeStream(const blink::WebURL& url);
virtual void abortStream(const blink::WebURL& url);
virtual void unregisterStreamURL(const blink::WebURL& url);
private:
void SendDataForBlob(const std::string& uuid_str,
const blink::WebThreadSafeData& data);
scoped_refptr<ThreadSafeSender> sender_;
};
} // namespace content
#endif // CONTENT_CHILD_FILEAPI_WEBBLOBREGISTRY_IMPL_H_
|