Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: content/child/webblobregistry_impl.h

Issue 610333002: [WebBlobRegistry] Use char* than WebThreadSafeData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/child/webblobregistry_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_WEBBLOBREGISTRY_IMPL_H_ 5 #ifndef CONTENT_CHILD_WEBBLOBREGISTRY_IMPL_H_
6 #define CONTENT_CHILD_WEBBLOBREGISTRY_IMPL_H_ 6 #define CONTENT_CHILD_WEBBLOBREGISTRY_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" 11 #include "third_party/WebKit/public/platform/WebBlobRegistry.h"
12 12
13 namespace blink {
14 class WebThreadSafeData;
15 } // namespace blink
16
13 namespace content { 17 namespace content {
14 class ThreadSafeSender; 18 class ThreadSafeSender;
15 19
16 class WebBlobRegistryImpl : public blink::WebBlobRegistry { 20 class WebBlobRegistryImpl : public blink::WebBlobRegistry {
17 public: 21 public:
18 explicit WebBlobRegistryImpl(ThreadSafeSender* sender); 22 explicit WebBlobRegistryImpl(ThreadSafeSender* sender);
19 virtual ~WebBlobRegistryImpl(); 23 virtual ~WebBlobRegistryImpl();
20 24
21 virtual void registerBlobData(const blink::WebString& uuid, 25 virtual void registerBlobData(const blink::WebString& uuid,
22 const blink::WebBlobData& data); 26 const blink::WebBlobData& data);
23 virtual void addBlobDataRef(const blink::WebString& uuid); 27 virtual void addBlobDataRef(const blink::WebString& uuid);
24 virtual void removeBlobDataRef(const blink::WebString& uuid); 28 virtual void removeBlobDataRef(const blink::WebString& uuid);
25 virtual void registerPublicBlobURL(const blink::WebURL&, 29 virtual void registerPublicBlobURL(const blink::WebURL&,
26 const blink::WebString& uuid); 30 const blink::WebString& uuid);
27 virtual void revokePublicBlobURL(const blink::WebURL&); 31 virtual void revokePublicBlobURL(const blink::WebURL&);
28 32
29 // Additional support for Streams. 33 // Additional support for Streams.
30 virtual void registerStreamURL(const blink::WebURL& url, 34 virtual void registerStreamURL(const blink::WebURL& url,
31 const blink::WebString& content_type); 35 const blink::WebString& content_type);
32 virtual void registerStreamURL(const blink::WebURL& url, 36 virtual void registerStreamURL(const blink::WebURL& url,
33 const blink::WebURL& src_url); 37 const blink::WebURL& src_url);
38 // TODO(tyoshino): Remove once removed in Blink side.
34 virtual void addDataToStream(const blink::WebURL& url, 39 virtual void addDataToStream(const blink::WebURL& url,
35 blink::WebThreadSafeData& data); 40 blink::WebThreadSafeData& data);
41 virtual void addDataToStream(const blink::WebURL& url,
42 const char* data, size_t length);
36 virtual void finalizeStream(const blink::WebURL& url); 43 virtual void finalizeStream(const blink::WebURL& url);
37 virtual void abortStream(const blink::WebURL& url); 44 virtual void abortStream(const blink::WebURL& url);
38 virtual void unregisterStreamURL(const blink::WebURL& url); 45 virtual void unregisterStreamURL(const blink::WebURL& url);
39 46
40 private: 47 private:
41 void SendDataForBlob(const std::string& uuid_str, 48 void SendDataForBlob(const std::string& uuid_str,
42 const blink::WebThreadSafeData& data); 49 const blink::WebThreadSafeData& data);
43 50
44 scoped_refptr<ThreadSafeSender> sender_; 51 scoped_refptr<ThreadSafeSender> sender_;
45 }; 52 };
46 53
47 } // namespace content 54 } // namespace content
48 55
49 #endif // CONTENT_CHILD_FILEAPI_WEBBLOBREGISTRY_IMPL_H_ 56 #endif // CONTENT_CHILD_FILEAPI_WEBBLOBREGISTRY_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/child/webblobregistry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698