diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-16 05:33:47 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-16 05:33:47 +0000 |
commit | cf13bb696f6a50b06930ed8fabb0984cd6af7be9 (patch) | |
tree | a883217d4a1eee49750954f851188c5ca6fa6308 /chrome/renderer/print_web_view_helper.cc | |
parent | 05158051ea881677c03a22ddf38a3e6779cebb9e (diff) | |
download | chromium_src-cf13bb696f6a50b06930ed8fabb0984cd6af7be9.zip chromium_src-cf13bb696f6a50b06930ed8fabb0984cd6af7be9.tar.gz chromium_src-cf13bb696f6a50b06930ed8fabb0984cd6af7be9.tar.bz2 |
Reverting 20854.
Review URL: http://codereview.chromium.org/155621
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20855 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, 15 insertions, 22 deletions
diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc index 115fc12..aac98ac 100644 --- a/chrome/renderer/print_web_view_helper.cc +++ b/chrome/renderer/print_web_view_helper.cc @@ -13,7 +13,6 @@ #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" @@ -25,8 +24,6 @@ #endif using WebKit::WebConsoleMessage; -using WebKit::WebRect; -using WebKit::WebScreenInfo; using WebKit::WebString; using WebKit::WebURLRequest; @@ -65,9 +62,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->size(); + prev_view_size_ = web_view->GetSize(); - web_view->resize(print_layout_size); + web_view->Resize(print_layout_size); expected_pages_count_ = frame->PrintBegin(print_canvas_size_); } @@ -82,7 +79,7 @@ class PrepareFrameAndViewForPrint { ~PrepareFrameAndViewForPrint() { frame_->PrintEnd(); - web_view_->resize(prev_view_size_); + web_view_->Resize(prev_view_size_); } private: @@ -233,7 +230,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(); } @@ -414,28 +411,24 @@ int32 PrintWebViewHelper::routing_id() { return render_view_->routing_id(); } -WebRect PrintWebViewHelper::windowRect() { - NOTREACHED(); - return WebRect(); +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::windowResizerRect() { +void PrintWebViewHelper::GetWindowRect(WebWidget* webwidget, + WebKit::WebRect* rect) { NOTREACHED(); - return WebRect(); } -WebRect PrintWebViewHelper::rootWindowRect() { +WebKit::WebScreenInfo PrintWebViewHelper::GetScreenInfo(WebWidget* webwidget) { + WebKit::WebScreenInfo info; NOTREACHED(); - return WebRect(); + return info; } -WebScreenInfo PrintWebViewHelper::screenInfo() { +bool PrintWebViewHelper::IsHidden(WebWidget* webwidget) { NOTREACHED(); - 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()); + return true; } |