Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: chrome/browser/renderer_host/resource_message_filter.cc

Issue 2927006: Option-click to download should not display "Save As" UI. (Closed)
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 } 901 }
902 902
903 void ResourceMessageFilter::OnForwardToWorker(const IPC::Message& message) { 903 void ResourceMessageFilter::OnForwardToWorker(const IPC::Message& message) {
904 WorkerService::GetInstance()->ForwardMessage(message, this); 904 WorkerService::GetInstance()->ForwardMessage(message, this);
905 } 905 }
906 906
907 void ResourceMessageFilter::OnDownloadUrl(const IPC::Message& message, 907 void ResourceMessageFilter::OnDownloadUrl(const IPC::Message& message,
908 const GURL& url, 908 const GURL& url,
909 const GURL& referrer) { 909 const GURL& referrer) {
910 URLRequestContext* context = request_context_->GetURLRequestContext(); 910 URLRequestContext* context = request_context_->GetURLRequestContext();
911
912 // Don't show "Save As" UI.
913 bool prompt_for_save_location = false;
911 resource_dispatcher_host_->BeginDownload(url, 914 resource_dispatcher_host_->BeginDownload(url,
912 referrer, 915 referrer,
913 DownloadSaveInfo(), 916 DownloadSaveInfo(),
917 prompt_for_save_location,
914 id(), 918 id(),
915 message.routing_id(), 919 message.routing_id(),
916 context); 920 context);
917 } 921 }
918 922
919 void ResourceMessageFilter::OnClipboardWriteObjectsSync( 923 void ResourceMessageFilter::OnClipboardWriteObjectsSync(
920 const Clipboard::ObjectMap& objects, 924 const Clipboard::ObjectMap& objects,
921 base::SharedMemoryHandle bitmap_handle) { 925 base::SharedMemoryHandle bitmap_handle) {
922 DCHECK(base::SharedMemory::IsHandleValid(bitmap_handle)) 926 DCHECK(base::SharedMemory::IsHandleValid(bitmap_handle))
923 << "Bad bitmap handle"; 927 << "Bad bitmap handle";
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 dictionary_map.insert( 1709 dictionary_map.insert(
1706 std::make_pair(ExtensionMessageBundle::kExtensionIdKey, extension_id)); 1710 std::make_pair(ExtensionMessageBundle::kExtensionIdKey, extension_id));
1707 1711
1708 ViewHostMsg_GetExtensionMessageBundle::WriteReplyParams( 1712 ViewHostMsg_GetExtensionMessageBundle::WriteReplyParams(
1709 reply_msg, dictionary_map); 1713 reply_msg, dictionary_map);
1710 1714
1711 ChromeThread::PostTask( 1715 ChromeThread::PostTask(
1712 ChromeThread::IO, FROM_HERE, 1716 ChromeThread::IO, FROM_HERE,
1713 NewRunnableMethod(this, &ResourceMessageFilter::Send, reply_msg)); 1717 NewRunnableMethod(this, &ResourceMessageFilter::Send, reply_msg));
1714 } 1718 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698