OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/common/fileapi/webblobregistry_impl.h" | 5 #include "content/common/fileapi/webblobregistry_impl.h" |
6 | 6 |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/shared_memory.h" | 8 #include "base/shared_memory.h" |
9 #include "content/common/child_thread.h" | 9 #include "content/common/child_thread.h" |
10 #include "content/common/fileapi/webblob_messages.h" | 10 #include "content/common/fileapi/webblob_messages.h" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobData.
h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobData.
h" |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" |
14 #include "webkit/blob/blob_data.h" | 14 #include "webkit/blob/blob_data.h" |
15 #include "webkit/glue/webkit_glue.h" | 15 #include "webkit/glue/webkit_glue.h" |
16 | 16 |
17 using WebKit::WebBlobData; | 17 using WebKit::WebBlobData; |
18 using WebKit::WebString; | 18 using WebKit::WebString; |
19 using WebKit::WebURL; | 19 using WebKit::WebURL; |
20 | 20 |
| 21 namespace content { |
| 22 |
21 WebBlobRegistryImpl::WebBlobRegistryImpl(ChildThread* child_thread) | 23 WebBlobRegistryImpl::WebBlobRegistryImpl(ChildThread* child_thread) |
22 : child_thread_(child_thread) { | 24 : child_thread_(child_thread) { |
23 } | 25 } |
24 | 26 |
25 WebBlobRegistryImpl::~WebBlobRegistryImpl() { | 27 WebBlobRegistryImpl::~WebBlobRegistryImpl() { |
26 } | 28 } |
27 | 29 |
28 void WebBlobRegistryImpl::registerBlobURL( | 30 void WebBlobRegistryImpl::registerBlobURL( |
29 const WebURL& url, WebBlobData& data) { | 31 const WebURL& url, WebBlobData& data) { |
30 const size_t kLargeThresholdBytes = 250 * 1024; | 32 const size_t kLargeThresholdBytes = 250 * 1024; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } | 107 } |
106 | 108 |
107 void WebBlobRegistryImpl::registerBlobURL( | 109 void WebBlobRegistryImpl::registerBlobURL( |
108 const WebURL& url, const WebURL& src_url) { | 110 const WebURL& url, const WebURL& src_url) { |
109 child_thread_->Send(new BlobHostMsg_CloneBlob(url, src_url)); | 111 child_thread_->Send(new BlobHostMsg_CloneBlob(url, src_url)); |
110 } | 112 } |
111 | 113 |
112 void WebBlobRegistryImpl::unregisterBlobURL(const WebURL& url) { | 114 void WebBlobRegistryImpl::unregisterBlobURL(const WebURL& url) { |
113 child_thread_->Send(new BlobHostMsg_RemoveBlob(url)); | 115 child_thread_->Send(new BlobHostMsg_RemoveBlob(url)); |
114 } | 116 } |
| 117 |
| 118 } // namespace content |
OLD | NEW |