Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / content / test / mock_webblob_registry_impl.h
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_TEST_MOCK_WEB_BLOB_REGISTRY_IMPL_H
6 #define CONTENT_TEST_MOCK_WEB_BLOB_REGISTRY_IMPL_H
7
8 #include "base/macros.h"
9 #include "third_party/WebKit/public/platform/WebBlobRegistry.h"
10
11 namespace content {
12
13 class MockWebBlobRegistryImpl : public blink::WebBlobRegistry {
14  public:
15   MockWebBlobRegistryImpl();
16   virtual ~MockWebBlobRegistryImpl();
17
18   virtual void registerBlobData(const blink::WebString& uuid,
19                                 const blink::WebBlobData& data);
20   virtual void addBlobDataRef(const blink::WebString& uuid);
21   virtual void removeBlobDataRef(const blink::WebString& uuid);
22   virtual void registerPublicBlobURL(const blink::WebURL&,
23                                      const blink::WebString& uuid);
24   virtual void revokePublicBlobURL(const blink::WebURL&);
25
26   // Additional support for Streams.
27   virtual void registerStreamURL(const blink::WebURL& url,
28                                  const blink::WebString& content_type);
29   virtual void registerStreamURL(const blink::WebURL& url,
30                                  const blink::WebURL& src_url);
31   virtual void addDataToStream(const blink::WebURL& url,
32                                const char* data, size_t length);
33   virtual void finalizeStream(const blink::WebURL& url);
34   virtual void abortStream(const blink::WebURL& url);
35   virtual void unregisterStreamURL(const blink::WebURL& url);
36
37  private:
38   DISALLOW_COPY_AND_ASSIGN(MockWebBlobRegistryImpl);
39 };
40
41 }  // namespace content
42
43 #endif  // CONTENT_TEST_MOCK_WEB_BLOB_REGISTRY_IMPL_H