Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 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_CHILD_FILEAPI_WEBBLOBREGISTRY_IMPL_H_ | 5 #ifndef CONTENT_TEST_MOCK_WEB_BLOB_REGISTRY_IMPL_H |
| 6 #define CONTENT_CHILD_FILEAPI_WEBBLOBREGISTRY_IMPL_H_ | 6 #define CONTENT_TEST_MOCK_WEB_BLOB_REGISTRY_IMPL_H |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.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 #include "webkit/common/blob/blob_data.h" | |
| 11 | 10 |
| 12 namespace blink { | 11 namespace blink { |
| 13 class WebBlobData; | 12 class WebBlobData; |
| 14 class WebString; | 13 class WebString; |
| 15 class WebThreadSafeData; | 14 class WebThreadSafeData; |
| 16 class WebURL; | 15 class WebURL; |
| 17 } | 16 } |
|
dcheng
2014/08/01 06:35:31
None of these forward declares should be required.
pwnall-personal
2014/08/01 20:37:47
Done.
Thank you! Good point!
I also removed the fo
| |
| 18 | 17 |
| 19 namespace content { | 18 namespace content { |
| 20 class ThreadSafeSender; | |
| 21 | 19 |
| 22 class WebBlobRegistryImpl : public blink::WebBlobRegistry { | 20 class MockWebBlobRegistryImpl : public blink::WebBlobRegistry { |
| 23 public: | 21 public: |
| 24 explicit WebBlobRegistryImpl(ThreadSafeSender* sender); | 22 MockWebBlobRegistryImpl(); |
| 25 virtual ~WebBlobRegistryImpl(); | 23 virtual ~MockWebBlobRegistryImpl(); |
| 26 | 24 |
| 27 virtual void registerBlobData(const blink::WebString& uuid, | 25 virtual void registerBlobData(const blink::WebString& uuid, |
| 28 const blink::WebBlobData& data); | 26 const blink::WebBlobData& data); |
| 29 virtual void addBlobDataRef(const blink::WebString& uuid); | 27 virtual void addBlobDataRef(const blink::WebString& uuid); |
| 30 virtual void removeBlobDataRef(const blink::WebString& uuid); | 28 virtual void removeBlobDataRef(const blink::WebString& uuid); |
| 31 virtual void registerPublicBlobURL(const blink::WebURL&, | 29 virtual void registerPublicBlobURL(const blink::WebURL&, |
| 32 const blink::WebString& uuid); | 30 const blink::WebString& uuid); |
| 33 virtual void revokePublicBlobURL(const blink::WebURL&); | 31 virtual void revokePublicBlobURL(const blink::WebURL&); |
| 34 | 32 |
| 35 // Additional support for Streams. | 33 // Additional support for Streams. |
| 36 virtual void registerStreamURL(const blink::WebURL& url, | 34 virtual void registerStreamURL(const blink::WebURL& url, |
| 37 const blink::WebString& content_type); | 35 const blink::WebString& content_type); |
| 38 virtual void registerStreamURL(const blink::WebURL& url, | 36 virtual void registerStreamURL(const blink::WebURL& url, |
| 39 const blink::WebURL& src_url); | 37 const blink::WebURL& src_url); |
| 40 virtual void addDataToStream(const blink::WebURL& url, | 38 virtual void addDataToStream(const blink::WebURL& url, |
| 41 blink::WebThreadSafeData& data); | 39 blink::WebThreadSafeData& data); |
| 42 virtual void finalizeStream(const blink::WebURL& url); | 40 virtual void finalizeStream(const blink::WebURL& url); |
| 43 virtual void abortStream(const blink::WebURL& url); | 41 virtual void abortStream(const blink::WebURL& url); |
| 44 virtual void unregisterStreamURL(const blink::WebURL& url); | 42 virtual void unregisterStreamURL(const blink::WebURL& url); |
| 45 | 43 |
| 46 private: | 44 private: |
| 47 void SendDataForBlob(const std::string& uuid_str, | 45 DISALLOW_COPY_AND_ASSIGN(MockWebBlobRegistryImpl); |
| 48 const blink::WebThreadSafeData& data); | |
| 49 | |
| 50 scoped_refptr<ThreadSafeSender> sender_; | |
| 51 }; | 46 }; |
| 52 | 47 |
| 53 } // namespace content | 48 } // namespace content |
| 54 | 49 |
| 55 #endif // CONTENT_CHILD_FILEAPI_WEBBLOBREGISTRY_IMPL_H_ | 50 #endif // CONTENT_TEST_MOCK_WEB_BLOB_REGISTRY_IMPL_H |
| OLD | NEW |