OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_TEST_MOCK_WEB_BLOB_REGISTRY_IMPL_H | 5 #ifndef CONTENT_TEST_MOCK_WEB_BLOB_REGISTRY_IMPL_H |
6 #define CONTENT_TEST_MOCK_WEB_BLOB_REGISTRY_IMPL_H | 6 #define CONTENT_TEST_MOCK_WEB_BLOB_REGISTRY_IMPL_H |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" | 9 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" |
10 | 10 |
| 11 namespace blink { |
| 12 class WebThreadSafeData; |
| 13 } // namespace blink |
| 14 |
11 namespace content { | 15 namespace content { |
12 | 16 |
13 class MockWebBlobRegistryImpl : public blink::WebBlobRegistry { | 17 class MockWebBlobRegistryImpl : public blink::WebBlobRegistry { |
14 public: | 18 public: |
15 MockWebBlobRegistryImpl(); | 19 MockWebBlobRegistryImpl(); |
16 virtual ~MockWebBlobRegistryImpl(); | 20 virtual ~MockWebBlobRegistryImpl(); |
17 | 21 |
18 virtual void registerBlobData(const blink::WebString& uuid, | 22 virtual void registerBlobData(const blink::WebString& uuid, |
19 const blink::WebBlobData& data); | 23 const blink::WebBlobData& data); |
20 virtual void addBlobDataRef(const blink::WebString& uuid); | 24 virtual void addBlobDataRef(const blink::WebString& uuid); |
21 virtual void removeBlobDataRef(const blink::WebString& uuid); | 25 virtual void removeBlobDataRef(const blink::WebString& uuid); |
22 virtual void registerPublicBlobURL(const blink::WebURL&, | 26 virtual void registerPublicBlobURL(const blink::WebURL&, |
23 const blink::WebString& uuid); | 27 const blink::WebString& uuid); |
24 virtual void revokePublicBlobURL(const blink::WebURL&); | 28 virtual void revokePublicBlobURL(const blink::WebURL&); |
25 | 29 |
26 // Additional support for Streams. | 30 // Additional support for Streams. |
27 virtual void registerStreamURL(const blink::WebURL& url, | 31 virtual void registerStreamURL(const blink::WebURL& url, |
28 const blink::WebString& content_type); | 32 const blink::WebString& content_type); |
29 virtual void registerStreamURL(const blink::WebURL& url, | 33 virtual void registerStreamURL(const blink::WebURL& url, |
30 const blink::WebURL& src_url); | 34 const blink::WebURL& src_url); |
| 35 // TODO(tyoshino): Remove once removed in Blink side. |
31 virtual void addDataToStream(const blink::WebURL& url, | 36 virtual void addDataToStream(const blink::WebURL& url, |
32 blink::WebThreadSafeData& data); | 37 blink::WebThreadSafeData& data); |
| 38 virtual void addDataToStream(const blink::WebURL& url, |
| 39 const char* data, size_t length); |
33 virtual void finalizeStream(const blink::WebURL& url); | 40 virtual void finalizeStream(const blink::WebURL& url); |
34 virtual void abortStream(const blink::WebURL& url); | 41 virtual void abortStream(const blink::WebURL& url); |
35 virtual void unregisterStreamURL(const blink::WebURL& url); | 42 virtual void unregisterStreamURL(const blink::WebURL& url); |
36 | 43 |
37 private: | 44 private: |
38 DISALLOW_COPY_AND_ASSIGN(MockWebBlobRegistryImpl); | 45 DISALLOW_COPY_AND_ASSIGN(MockWebBlobRegistryImpl); |
39 }; | 46 }; |
40 | 47 |
41 } // namespace content | 48 } // namespace content |
42 | 49 |
43 #endif // CONTENT_TEST_MOCK_WEB_BLOB_REGISTRY_IMPL_H | 50 #endif // CONTENT_TEST_MOCK_WEB_BLOB_REGISTRY_IMPL_H |
OLD | NEW |