Index: chrome/renderer/printing/print_web_view_helper.cc |
diff --git a/chrome/renderer/printing/print_web_view_helper.cc b/chrome/renderer/printing/print_web_view_helper.cc |
index 3966b363900ff52235a906eb148c96b4f41ac3af..5ea73401e4964bb94e9bcf39356b88592eb108eb 100644 |
--- a/chrome/renderer/printing/print_web_view_helper.cc |
+++ b/chrome/renderer/printing/print_web_view_helper.cc |
@@ -858,15 +858,15 @@ void PrintWebViewHelper::OnPrintForPrintPreview( |
bool PrintWebViewHelper::GetPrintFrame(WebKit::WebFrame** frame) { |
DCHECK(frame); |
- DCHECK(render_view()->GetWebView()); |
- if (!render_view()->GetWebView()) |
+ WebKit::WebView* webView = render_view()->GetWebView(); |
+ DCHECK(webView); |
+ if (!webView) |
vivekg_samsung
2013/06/24 09:29:14
Having both "DCHECK(webView)" and "if (!webView) r
|
return false; |
// If the user has selected text in the currently focused frame we print |
// only that frame (this makes print selection work for multiple frames). |
- *frame = render_view()->GetWebView()->focusedFrame()->hasSelection() ? |
- render_view()->GetWebView()->focusedFrame() : |
- render_view()->GetWebView()->mainFrame(); |
+ WebKit::WebFrame* focusedFrame = webView->focusedFrame(); |
+ *frame = focusedFrame->hasSelection() ? focusedFrame : webView->mainFrame(); |
return true; |
} |