| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/renderer/mock_render_thread.h" | 5 #include "chrome/renderer/mock_render_thread.h" |
| 6 | 6 |
| 7 #include "chrome/common/ipc_message_utils.h" | 7 #include "chrome/common/ipc_message_utils.h" |
| 8 #include "chrome/common/render_messages.h" | 8 #include "chrome/common/render_messages.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 } | 110 } |
| 111 | 111 |
| 112 void MockRenderThread::OnGetDefaultPrintSettings(ViewMsg_Print_Params* params) { | 112 void MockRenderThread::OnGetDefaultPrintSettings(ViewMsg_Print_Params* params) { |
| 113 if (printer_.get()) | 113 if (printer_.get()) |
| 114 printer_->GetDefaultPrintSettings(params); | 114 printer_->GetDefaultPrintSettings(params); |
| 115 } | 115 } |
| 116 | 116 |
| 117 void MockRenderThread::OnScriptedPrint(gfx::NativeViewId host_window, | 117 void MockRenderThread::OnScriptedPrint(gfx::NativeViewId host_window, |
| 118 int cookie, | 118 int cookie, |
| 119 int expected_pages_count, | 119 int expected_pages_count, |
| 120 bool has_selection, |
| 120 ViewMsg_PrintPages_Params* settings) { | 121 ViewMsg_PrintPages_Params* settings) { |
| 121 if (printer_.get()) | 122 if (printer_.get()) { |
| 122 printer_->ScriptedPrint(cookie, expected_pages_count, settings); | 123 printer_->ScriptedPrint(cookie, |
| 124 expected_pages_count, |
| 125 has_selection, |
| 126 settings); |
| 127 } |
| 123 } | 128 } |
| 124 | 129 |
| 125 void MockRenderThread::OnDidGetPrintedPagesCount(int cookie, int number_pages) { | 130 void MockRenderThread::OnDidGetPrintedPagesCount(int cookie, int number_pages) { |
| 126 if (printer_.get()) | 131 if (printer_.get()) |
| 127 printer_->SetPrintedPagesCount(cookie, number_pages); | 132 printer_->SetPrintedPagesCount(cookie, number_pages); |
| 128 } | 133 } |
| 129 | 134 |
| 130 void MockRenderThread::OnDidPrintPage( | 135 void MockRenderThread::OnDidPrintPage( |
| 131 const ViewHostMsg_DidPrintPage_Params& params) { | 136 const ViewHostMsg_DidPrintPage_Params& params) { |
| 132 if (printer_.get()) | 137 if (printer_.get()) |
| 133 printer_->PrintPage(params); | 138 printer_->PrintPage(params); |
| 134 } | 139 } |
| OLD | NEW |