OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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 WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBBLOBREGISTRY_IMPL_H_ |
| 6 #define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBBLOBREGISTRY_IMPL_H_ |
| 7 |
| 8 #include "base/ref_counted.h" |
| 9 #include "third_party/WebKit/WebKit/chromium/public/WebBlobRegistry.h" |
| 10 |
| 11 class GURL; |
| 12 |
| 13 namespace webkit_blob { |
| 14 class BlobData; |
| 15 class BlobStorageController; |
| 16 } |
| 17 |
| 18 class TestShellWebBlobRegistryImpl |
| 19 : public WebKit::WebBlobRegistry, |
| 20 public base::RefCountedThreadSafe<TestShellWebBlobRegistryImpl> { |
| 21 public: |
| 22 static void InitializeOnIOThread( |
| 23 webkit_blob::BlobStorageController* blob_storage_controller); |
| 24 static void Cleanup(); |
| 25 |
| 26 TestShellWebBlobRegistryImpl(); |
| 27 |
| 28 // See WebBlobRegistry.h for documentation on these functions. |
| 29 virtual void registerBlobURL(const WebKit::WebURL& url, |
| 30 WebKit::WebBlobData& data); |
| 31 virtual void registerBlobURL(const WebKit::WebURL& url, |
| 32 const WebKit::WebURL& src_url); |
| 33 virtual void unregisterBlobURL(const WebKit::WebURL& url); |
| 34 |
| 35 // Run on I/O thread. |
| 36 void DoRegisterBlobUrl(const GURL& url, webkit_blob::BlobData* blob_data); |
| 37 void DoRegisterBlobUrlFrom(const GURL& url, const GURL& src_url); |
| 38 void DoUnregisterBlobUrl(const GURL& url); |
| 39 |
| 40 protected: |
| 41 friend class base::RefCountedThreadSafe<TestShellWebBlobRegistryImpl>; |
| 42 |
| 43 private: |
| 44 DISALLOW_COPY_AND_ASSIGN(TestShellWebBlobRegistryImpl); |
| 45 }; |
| 46 |
| 47 #endif // WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBBLOBREGISTRY_IMPL_H_ |
OLD | NEW |