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

Side by Side Diff: chrome/renderer/chrome_mock_render_thread.cc

Issue 12087005: Async frame preparation for Preview with support if selection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/renderer/mock_printer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/renderer/chrome_mock_render_thread.h" 5 #include "chrome/renderer/chrome_mock_render_thread.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/common/extensions/extension_messages.h" 10 #include "chrome/common/extensions/extension_messages.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 // Page numbers are 1-based in the dictionary. 178 // Page numbers are 1-based in the dictionary.
179 // Page numbers are 0-based for the printing context. 179 // Page numbers are 0-based for the printing context.
180 range.from--; 180 range.from--;
181 range.to--; 181 range.to--;
182 new_ranges.push_back(range); 182 new_ranges.push_back(range);
183 } 183 }
184 } 184 }
185 std::vector<int> pages(printing::PageRange::GetPages(new_ranges)); 185 std::vector<int> pages(printing::PageRange::GetPages(new_ranges));
186 printer_->UpdateSettings(document_cookie, params, pages, margins_type); 186 printer_->UpdateSettings(document_cookie, params, pages, margins_type);
187
188 job_settings.GetBoolean(printing::kSettingShouldPrintSelectionOnly,
189 &params->params.selection_only);
190 job_settings.GetBoolean(printing::kSettingShouldPrintBackgrounds,
191 &params->params.should_print_backgrounds);
187 } 192 }
188 193
189 MockPrinter* ChromeMockRenderThread::printer() { 194 MockPrinter* ChromeMockRenderThread::printer() {
190 return printer_.get(); 195 return printer_.get();
191 } 196 }
192 197
193 void ChromeMockRenderThread::set_print_dialog_user_response(bool response) { 198 void ChromeMockRenderThread::set_print_dialog_user_response(bool response) {
194 print_dialog_user_response_ = response; 199 print_dialog_user_response_ = response;
195 } 200 }
196 201
197 void ChromeMockRenderThread::set_print_preview_cancel_page_number(int page) { 202 void ChromeMockRenderThread::set_print_preview_cancel_page_number(int page) {
198 print_preview_cancel_page_number_ = page; 203 print_preview_cancel_page_number_ = page;
199 } 204 }
200 205
201 int ChromeMockRenderThread::print_preview_pages_remaining() const { 206 int ChromeMockRenderThread::print_preview_pages_remaining() const {
202 return print_preview_pages_remaining_; 207 return print_preview_pages_remaining_;
203 } 208 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/mock_printer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698