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

Unified Diff: chrome/renderer/print_web_view_helper.cc

Issue 149620: Use WebWidget from the WebKit API. This change also makes... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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') | chrome/renderer/render_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/print_web_view_helper.cc
===================================================================
--- chrome/renderer/print_web_view_helper.cc (revision 20851)
+++ chrome/renderer/print_web_view_helper.cc (working copy)
@@ -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 @@
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 @@
~PrepareFrameAndViewForPrint() {
frame_->PrintEnd();
- web_view_->Resize(prev_view_size_);
+ web_view_->resize(prev_view_size_);
}
private:
@@ -230,7 +233,7 @@
}
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 @@
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());
+}
« no previous file with comments | « chrome/renderer/print_web_view_helper.h ('k') | chrome/renderer/render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698