OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/browser/renderer_host/resource_message_filter.h" | 5 #include "chrome/browser/renderer_host/resource_message_filter.h" |
6 | 6 |
7 #include "app/clipboard/clipboard.h" | 7 #include "app/clipboard/clipboard.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #if defined(OS_POSIX) | 10 #if defined(OS_POSIX) |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 URLRequestContext* context = request_context_->GetURLRequestContext(); | 856 URLRequestContext* context = request_context_->GetURLRequestContext(); |
857 | 857 |
858 // Don't show "Save As" UI. | 858 // Don't show "Save As" UI. |
859 bool prompt_for_save_location = false; | 859 bool prompt_for_save_location = false; |
860 resource_dispatcher_host_->BeginDownload(url, | 860 resource_dispatcher_host_->BeginDownload(url, |
861 referrer, | 861 referrer, |
862 DownloadSaveInfo(), | 862 DownloadSaveInfo(), |
863 prompt_for_save_location, | 863 prompt_for_save_location, |
864 id(), | 864 id(), |
865 message.routing_id(), | 865 message.routing_id(), |
866 context); | 866 context, |
| 867 0); |
867 } | 868 } |
868 | 869 |
869 void ResourceMessageFilter::OnClipboardWriteObjectsSync( | 870 void ResourceMessageFilter::OnClipboardWriteObjectsSync( |
870 const Clipboard::ObjectMap& objects, | 871 const Clipboard::ObjectMap& objects, |
871 base::SharedMemoryHandle bitmap_handle) { | 872 base::SharedMemoryHandle bitmap_handle) { |
872 DCHECK(base::SharedMemory::IsHandleValid(bitmap_handle)) | 873 DCHECK(base::SharedMemory::IsHandleValid(bitmap_handle)) |
873 << "Bad bitmap handle"; | 874 << "Bad bitmap handle"; |
874 // We cannot write directly from the IO thread, and cannot service the IPC | 875 // We cannot write directly from the IO thread, and cannot service the IPC |
875 // on the UI thread. We'll copy the relevant data and get a handle to any | 876 // on the UI thread. We'll copy the relevant data and get a handle to any |
876 // shared memory so it doesn't go away when we resume the renderer, and post | 877 // shared memory so it doesn't go away when we resume the renderer, and post |
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1820 | 1821 |
1821 ViewHostMsg_GetRawCookies::WriteReplyParams(reply_msg_, cookies); | 1822 ViewHostMsg_GetRawCookies::WriteReplyParams(reply_msg_, cookies); |
1822 filter_->Send(reply_msg_); | 1823 filter_->Send(reply_msg_); |
1823 delete this; | 1824 delete this; |
1824 } | 1825 } |
1825 } | 1826 } |
1826 | 1827 |
1827 void GetCookiesCompletion::set_cookie_store(CookieStore* cookie_store) { | 1828 void GetCookiesCompletion::set_cookie_store(CookieStore* cookie_store) { |
1828 cookie_store_ = cookie_store; | 1829 cookie_store_ = cookie_store; |
1829 } | 1830 } |
OLD | NEW |