diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/renderer/print_web_view_helper.cc | 7 | ||||
-rw-r--r-- | chrome/renderer/print_web_view_helper.h | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc index d0ad4db..40fe523 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. diff --git a/chrome/renderer/print_web_view_helper.h b/chrome/renderer/print_web_view_helper.h index f80c507..0c971b5 100644 --- a/chrome/renderer/print_web_view_helper.h +++ b/chrome/renderer/print_web_view_helper.h @@ -10,6 +10,7 @@ #include "base/scoped_ptr.h" #include "base/time.h" #include "gfx/size.h" +#include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" #include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h" namespace gfx { @@ -70,7 +71,8 @@ class PrepareFrameAndViewForPrint { // PrintWebViewHelper handles most of the printing grunt work for RenderView. // We plan on making print asynchronous and that will require copying the DOM // of the document and creating a new WebView with the contents. -class PrintWebViewHelper : public WebKit::WebViewClient { +class PrintWebViewHelper : public WebKit::WebViewClient, + public WebKit::WebFrameClient { public: explicit PrintWebViewHelper(RenderView* render_view); virtual ~PrintWebViewHelper(); |