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

Unified Diff: chrome/renderer/print_web_view_helper.cc

Issue 1992017: Fix Print Selection. (Closed)
Patch Set: Merged ToT. Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/print_web_view_helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/print_web_view_helper.cc
diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc
index d0ad4dba9b94fd9679a33fe95d9d9417a6925293..40fe5233dbe74581d0aa4d170494651470dc5887 100644
--- a/chrome/renderer/print_web_view_helper.cc
+++ b/chrome/renderer/print_web_view_helper.cc
@@ -153,10 +153,7 @@ void PrintWebViewHelper::Print(WebFrame* frame, bool script_initiated) {
// of this message has to deal with this.
params.host_window_id = render_view_->host_window();
params.cookie = default_settings.document_cookie;
- // TODO(maruel): Reenable once http://crbug.com/22937 is fixed.
- // Print selection is broken because DidStopLoading is never called.
- // params.has_selection = frame->hasSelection();
- params.has_selection = false;
+ params.has_selection = frame->hasSelection();
params.expected_pages_count = expected_pages_count;
params.use_overlays = use_browser_overlays;
@@ -240,7 +237,7 @@ bool PrintWebViewHelper::CopyAndPrint(const ViewMsg_PrintPages_Params& params,
print_web_view_ = WebView::create(this);
prefs.Apply(print_web_view_);
- print_web_view_->initializeMainFrame(NULL);
+ print_web_view_->initializeMainFrame(this);
print_pages_params_.reset(new ViewMsg_PrintPages_Params(params));
print_pages_params_->pages.clear(); // Print all pages of selection.
« no previous file with comments | « chrome/renderer/print_web_view_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698