summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-12 19:26:40 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-12 19:26:40 +0000
commitfc790462b4f248712bbc8c3734664dd6b05f80f2 (patch)
tree4ef04b11c6620ac2c95fb3f87e0d722e7bbcd1ee /chrome/browser/renderer_host
parent1d0ee423b6a0bb307c7c19fe28c95d8761691e9a (diff)
downloadchromium_src-fc790462b4f248712bbc8c3734664dd6b05f80f2.zip
chromium_src-fc790462b4f248712bbc8c3734664dd6b05f80f2.tar.gz
chromium_src-fc790462b4f248712bbc8c3734664dd6b05f80f2.tar.bz2
Set the job name for the print job on the Mac.
BUG=http://crbug.com/29188 TEST=as in bug Review URL: http://codereview.chromium.org/1997016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47056 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc24
1 files changed, 5 insertions, 19 deletions
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index bf79fa5..791cd5b 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -433,7 +433,8 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWidget, OnMsgCreateWidget)
IPC_MESSAGE_HANDLER(ViewHostMsg_SetCookie, OnSetCookie)
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetCookies, OnGetCookies)
- IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetRawCookies, OnGetRawCookies)
+ IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetRawCookies,
+ OnGetRawCookies)
IPC_MESSAGE_HANDLER(ViewHostMsg_DeleteCookie, OnDeleteCookie)
IPC_MESSAGE_HANDLER(ViewHostMsg_GetCookiesEnabled, OnGetCookiesEnabled)
#if defined(OS_WIN) // This hack is Windows-specific.
@@ -1131,12 +1132,8 @@ void ResourceMessageFilter::OnGetDefaultPrintSettingsReply(
void ResourceMessageFilter::OnScriptedPrint(
const ViewHostMsg_ScriptedPrint_Params& params,
IPC::Message* reply_msg) {
-#if defined(OS_WIN)
- HWND host_window = gfx::NativeViewFromId(params.host_window_id);
-#elif defined(OS_MACOSX)
- gfx::NativeWindow host_window = NULL;
- // TODO: Get an actual window ref here, to allow a sheet-based print dialog.
-#endif
+ gfx::NativeView host_view =
+ gfx::NativeViewFromIdInBrowser(params.host_window_id);
scoped_refptr<printing::PrinterQuery> printer_query;
print_job_manager_->PopPrinterQuery(params.cookie, &printer_query);
@@ -1150,20 +1147,9 @@ void ResourceMessageFilter::OnScriptedPrint(
printer_query,
params.routing_id,
reply_msg);
-#if defined(OS_WIN)
- // Shows the Print... dialog box. This is asynchronous, only the IPC message
- // sender will hang until the Print dialog is dismissed.
- if (!host_window || !IsWindow(host_window)) {
- // TODO(maruel): bug 1214347 Get the right browser window instead.
- host_window = GetDesktopWindow();
- } else {
- host_window = GetAncestor(host_window, GA_ROOTOWNER);
- }
- DCHECK(host_window);
-#endif
printer_query->GetSettings(printing::PrinterQuery::ASK_USER,
- host_window,
+ host_view,
params.expected_pages_count,
params.has_selection,
params.use_overlays,