| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ppapi/proxy/printing_resource.h" | 5 #include "ppapi/proxy/printing_resource.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "ipc/ipc_message.h" | 8 #include "ipc/ipc_message.h" |
| 9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/proxy/dispatch_reply_message.h" | 10 #include "ppapi/proxy/dispatch_reply_message.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 void PrintingResource::OnPluginMsgGetDefaultPrintSettingsReply( | 44 void PrintingResource::OnPluginMsgGetDefaultPrintSettingsReply( |
| 45 PP_PrintSettings_Dev* settings_out, | 45 PP_PrintSettings_Dev* settings_out, |
| 46 scoped_refptr<TrackedCallback> callback, | 46 scoped_refptr<TrackedCallback> callback, |
| 47 const ResourceMessageReplyParams& params, | 47 const ResourceMessageReplyParams& params, |
| 48 const PP_PrintSettings_Dev& settings) { | 48 const PP_PrintSettings_Dev& settings) { |
| 49 if (params.result() == PP_OK) | 49 if (params.result() == PP_OK) |
| 50 *settings_out = settings; | 50 *settings_out = settings; |
| 51 | 51 |
| 52 // Notify the plugin of the new data. | 52 // Notify the plugin of the new data. |
| 53 TrackedCallback::ClearAndRun(&callback, params.result()); | 53 callback->Run(params.result()); |
| 54 // DANGER: May delete |this|! | 54 // DANGER: May delete |this|! |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace proxy | 57 } // namespace proxy |
| 58 } // namespace ppapi | 58 } // namespace ppapi |
| OLD | NEW |