OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "base/clipboard.h" | 7 #include "base/clipboard.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/gfx/native_widget_types.h" | 9 #include "base/gfx/native_widget_types.h" |
10 #include "base/histogram.h" | 10 #include "base/histogram.h" |
11 #include "base/process_util.h" | 11 #include "base/process_util.h" |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 } | 728 } |
729 | 729 |
730 CancelableTask* task = NewRunnableMethod( | 730 CancelableTask* task = NewRunnableMethod( |
731 this, | 731 this, |
732 &ResourceMessageFilter::OnGetDefaultPrintSettingsReply, | 732 &ResourceMessageFilter::OnGetDefaultPrintSettingsReply, |
733 printer_query, | 733 printer_query, |
734 reply_msg); | 734 reply_msg); |
735 // Loads default settings. This is asynchronous, only the IPC message sender | 735 // Loads default settings. This is asynchronous, only the IPC message sender |
736 // will hang until the settings are retrieved. | 736 // will hang until the settings are retrieved. |
737 printer_query->GetSettings(printing::PrinterQuery::DEFAULTS, | 737 printer_query->GetSettings(printing::PrinterQuery::DEFAULTS, |
738 0, | 738 NULL, |
739 0, | 739 0, |
740 false, | 740 false, |
741 task); | 741 task); |
742 } | 742 } |
743 | 743 |
744 void ResourceMessageFilter::OnGetDefaultPrintSettingsReply( | 744 void ResourceMessageFilter::OnGetDefaultPrintSettingsReply( |
745 scoped_refptr<printing::PrinterQuery> printer_query, | 745 scoped_refptr<printing::PrinterQuery> printer_query, |
746 IPC::Message* reply_msg) { | 746 IPC::Message* reply_msg) { |
747 ViewMsg_Print_Params params; | 747 ViewMsg_Print_Params params; |
748 if (printer_query->last_status() != printing::PrintingContext::OK) { | 748 if (printer_query->last_status() != printing::PrintingContext::OK) { |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
984 } | 984 } |
985 | 985 |
986 void ResourceMessageFilter::ReplyGetFileSize(int64 result, void* param) { | 986 void ResourceMessageFilter::ReplyGetFileSize(int64 result, void* param) { |
987 IPC::Message* reply_msg = static_cast<IPC::Message*>(param); | 987 IPC::Message* reply_msg = static_cast<IPC::Message*>(param); |
988 ViewHostMsg_GetFileSize::WriteReplyParams(reply_msg, result); | 988 ViewHostMsg_GetFileSize::WriteReplyParams(reply_msg, result); |
989 Send(reply_msg); | 989 Send(reply_msg); |
990 | 990 |
991 // Getting file size callback done, decrease the ref count. | 991 // Getting file size callback done, decrease the ref count. |
992 Release(); | 992 Release(); |
993 } | 993 } |
OLD | NEW |