This commit is contained in:
Haojian Wu 2015-06-01 18:00:00 +08:00
parent 10da361db1
commit 2597ded985
5 changed files with 13 additions and 72 deletions

View file

@ -717,19 +717,16 @@ void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
blink::WebLocalFrame* frame;
if (GetPrintFrame(&frame)) {
print_preview_context_.InitWithFrame(frame);
LOG(ERROR) << "OnPrintPreview1";
if (!print_preview_context_.source_frame()) {
DidFinishPrinting(FAIL_PREVIEW);
return;
}
LOG(ERROR) << "OnPrintPreview2";
if (!UpdatePrintSettings(print_preview_context_.source_frame(),
print_preview_context_.source_node(), settings)) {
DidFinishPrinting(FAIL_PREVIEW);
return;
}
LOG(ERROR) << "OnPrintPreview3";
is_print_ready_metafile_sent_ = false;
PrepareFrameForPreviewDocument();
}