| 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_WEBBLOB_REGISTRY_IMPL_H_ | 5 #ifndef CONTENT_TEST_MOCK_WEBBLOB_REGISTRY_IMPL_H_ |
| 6 #define CONTENT_TEST_MOCK_WEBBLOB_REGISTRY_IMPL_H_ | 6 #define CONTENT_TEST_MOCK_WEBBLOB_REGISTRY_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" | 11 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 class MockWebBlobRegistryImpl : public blink::WebBlobRegistry { | 15 class MockWebBlobRegistryImpl : public blink::WebBlobRegistry { |
| 16 public: | 16 public: |
| 17 MockWebBlobRegistryImpl(); | 17 MockWebBlobRegistryImpl(); |
| 18 ~MockWebBlobRegistryImpl() override; | 18 ~MockWebBlobRegistryImpl() override; |
| 19 | 19 |
| 20 void registerBlobData(const blink::WebString& uuid, | 20 void registerBlobData(const blink::WebString& uuid, |
| 21 const blink::WebBlobData& data) override; | 21 const blink::WebBlobData& data) override; |
| 22 Builder* createBuilder(const blink::WebString& uuid, |
| 23 const blink::WebString& contentType) override; |
| 22 void addBlobDataRef(const blink::WebString& uuid) override; | 24 void addBlobDataRef(const blink::WebString& uuid) override; |
| 23 void removeBlobDataRef(const blink::WebString& uuid) override; | 25 void removeBlobDataRef(const blink::WebString& uuid) override; |
| 24 void registerPublicBlobURL(const blink::WebURL&, | 26 void registerPublicBlobURL(const blink::WebURL&, |
| 25 const blink::WebString& uuid) override; | 27 const blink::WebString& uuid) override; |
| 26 void revokePublicBlobURL(const blink::WebURL&) override; | 28 void revokePublicBlobURL(const blink::WebURL&) override; |
| 27 | 29 |
| 28 // Additional support for Streams. | 30 // Additional support for Streams. |
| 29 void registerStreamURL(const blink::WebURL& url, | 31 void registerStreamURL(const blink::WebURL& url, |
| 30 const blink::WebString& content_type) override; | 32 const blink::WebString& content_type) override; |
| 31 void registerStreamURL(const blink::WebURL& url, | 33 void registerStreamURL(const blink::WebURL& url, |
| 32 const blink::WebURL& src_url) override; | 34 const blink::WebURL& src_url) override; |
| 33 void addDataToStream(const blink::WebURL& url, | 35 void addDataToStream(const blink::WebURL& url, |
| 34 const char* data, | 36 const char* data, |
| 35 size_t length) override; | 37 size_t length) override; |
| 36 void flushStream(const blink::WebURL& url) override; | 38 void flushStream(const blink::WebURL& url) override; |
| 37 void finalizeStream(const blink::WebURL& url) override; | 39 void finalizeStream(const blink::WebURL& url) override; |
| 38 void abortStream(const blink::WebURL& url) override; | 40 void abortStream(const blink::WebURL& url) override; |
| 39 void unregisterStreamURL(const blink::WebURL& url) override; | 41 void unregisterStreamURL(const blink::WebURL& url) override; |
| 40 | 42 |
| 41 private: | 43 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(MockWebBlobRegistryImpl); | 44 DISALLOW_COPY_AND_ASSIGN(MockWebBlobRegistryImpl); |
| 43 }; | 45 }; |
| 44 | 46 |
| 45 } // namespace content | 47 } // namespace content |
| 46 | 48 |
| 47 #endif // CONTENT_TEST_MOCK_WEBBLOB_REGISTRY_IMPL_H_ | 49 #endif // CONTENT_TEST_MOCK_WEBBLOB_REGISTRY_IMPL_H_ |
| OLD | NEW |