diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-16 06:36:28 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-16 06:36:28 +0000 |
commit | 4873c7de675554a357717ddedc1fcaca2820de19 (patch) | |
tree | cd6446547d3b9d57f634187aecb1853c5ecbc8fb /chrome/renderer/print_web_view_helper.cc | |
parent | 3b846396a90174835320be2ff50afe8dd4e31590 (diff) | |
download | chromium_src-4873c7de675554a357717ddedc1fcaca2820de19.zip chromium_src-4873c7de675554a357717ddedc1fcaca2820de19.tar.gz chromium_src-4873c7de675554a357717ddedc1fcaca2820de19.tar.bz2 |
Reverting 20855.
Review URL: http://codereview.chromium.org/149744
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20859 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/print_web_view_helper.cc')
-rw-r--r-- | chrome/renderer/print_web_view_helper.cc | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc index aac98ac..115fc12 100644 --- a/chrome/renderer/print_web_view_helper.cc +++ b/chrome/renderer/print_web_view_helper.cc @@ -13,6 +13,7 @@ #include "printing/native_metafile.h" #include "printing/units.h" #include "webkit/api/public/WebConsoleMessage.h" +#include "webkit/api/public/WebRect.h" #include "webkit/api/public/WebScreenInfo.h" #include "webkit/api/public/WebSize.h" #include "webkit/api/public/WebURL.h" @@ -24,6 +25,8 @@ #endif using WebKit::WebConsoleMessage; +using WebKit::WebRect; +using WebKit::WebScreenInfo; using WebKit::WebString; using WebKit::WebURLRequest; @@ -62,9 +65,9 @@ class PrepareFrameAndViewForPrint { print_layout_size.set_height(static_cast<int>( static_cast<double>(print_layout_size.height()) * 1.25)); - prev_view_size_ = web_view->GetSize(); + prev_view_size_ = web_view->size(); - web_view->Resize(print_layout_size); + web_view->resize(print_layout_size); expected_pages_count_ = frame->PrintBegin(print_canvas_size_); } @@ -79,7 +82,7 @@ class PrepareFrameAndViewForPrint { ~PrepareFrameAndViewForPrint() { frame_->PrintEnd(); - web_view_->Resize(prev_view_size_); + web_view_->resize(prev_view_size_); } private: @@ -230,7 +233,7 @@ void PrintWebViewHelper::DidFinishPrinting(bool success) { } if (print_web_view_.get()) { - print_web_view_->Close(); + print_web_view_->close(); print_web_view_.release(); // Close deletes object. print_pages_params_.reset(); } @@ -411,24 +414,28 @@ int32 PrintWebViewHelper::routing_id() { return render_view_->routing_id(); } -void PrintWebViewHelper::DidStopLoading(WebView* webview) { - DCHECK(print_pages_params_.get() != NULL); - DCHECK_EQ(webview, print_web_view_.get()); - PrintPages(*print_pages_params_.get(), print_web_view_->GetMainFrame()); +WebRect PrintWebViewHelper::windowRect() { + NOTREACHED(); + return WebRect(); } -void PrintWebViewHelper::GetWindowRect(WebWidget* webwidget, - WebKit::WebRect* rect) { +WebRect PrintWebViewHelper::windowResizerRect() { NOTREACHED(); + return WebRect(); } -WebKit::WebScreenInfo PrintWebViewHelper::GetScreenInfo(WebWidget* webwidget) { - WebKit::WebScreenInfo info; +WebRect PrintWebViewHelper::rootWindowRect() { NOTREACHED(); - return info; + return WebRect(); } -bool PrintWebViewHelper::IsHidden(WebWidget* webwidget) { +WebScreenInfo PrintWebViewHelper::screenInfo() { NOTREACHED(); - return true; + return WebScreenInfo(); +} + +void PrintWebViewHelper::DidStopLoading(WebView* webview) { + DCHECK(print_pages_params_.get() != NULL); + DCHECK_EQ(webview, print_web_view_.get()); + PrintPages(*print_pages_params_.get(), print_web_view_->GetMainFrame()); } |