| 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 #include "chrome/common/webblobregistry_impl.h" |
| 6 |
| 7 #include "base/ref_counted.h" |
| 8 #include "chrome/common/render_messages.h" |
| 9 #include "third_party/WebKit/WebKit/chromium/public/WebBlobData.h" |
| 10 #include "third_party/WebKit/WebKit/chromium/public/WebBlobStorageData.h" |
| 11 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
| 12 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" |
| 13 #include "webkit/blob/blob_data.h" |
| 14 |
| 15 using WebKit::WebBlobData; |
| 16 using WebKit::WebBlobStorageData; |
| 17 using WebKit::WebString; |
| 18 using WebKit::WebURL; |
| 19 |
| 20 WebBlobRegistryImpl::WebBlobRegistryImpl(IPC::Message::Sender* sender) |
| 21 : sender_(sender) { |
| 22 } |
| 23 |
| 24 WebBlobRegistryImpl::~WebBlobRegistryImpl() { |
| 25 } |
| 26 |
| 27 void WebBlobRegistryImpl::registerBlobURL( |
| 28 const WebURL& url, WebBlobData& data) { |
| 29 scoped_refptr<webkit_blob::BlobData> blob_data( |
| 30 new webkit_blob::BlobData(data)); |
| 31 sender_->Send(new ViewHostMsg_RegisterBlobUrl(url, blob_data)); |
| 32 } |
| 33 |
| 34 void WebBlobRegistryImpl::registerBlobURL( |
| 35 const WebURL& url, const WebURL& src_url) { |
| 36 sender_->Send(new ViewHostMsg_RegisterBlobUrlFrom(url, src_url)); |
| 37 } |
| 38 |
| 39 void WebBlobRegistryImpl::unregisterBlobURL(const WebURL& url) { |
| 40 sender_->Send(new ViewHostMsg_UnregisterBlobUrl(url)); |
| 41 } |
| OLD | NEW |