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

Unified Diff: content/renderer/gpu/gpu_benchmarking_extension.cc

Issue 2923343005: Move printing-related methods from WebFrame to WebLocalFrame. (Closed)
Patch Set: Rebasing... Created 3 years, 6 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 | « components/printing/renderer/print_web_view_helper.cc ('k') | content/shell/test_runner/pixel_dump.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/gpu_benchmarking_extension.cc
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc
index e05aab5161ce22276c8e69a28879a7086d751d99..a0397899c1713edae561c6eff75c12ec4b3f6540 100644
--- a/content/renderer/gpu/gpu_benchmarking_extension.cc
+++ b/content/renderer/gpu/gpu_benchmarking_extension.cc
@@ -6,8 +6,10 @@
#include <stddef.h>
+#include <memory>
#include <string>
#include <utility>
+#include <vector>
#include "base/base64.h"
#include "base/command_line.h"
@@ -467,7 +469,7 @@ bool BeginSmoothDrag(v8::Isolate* isolate,
return true;
}
-static void PrintDocument(blink::WebFrame* frame, SkDocument* doc) {
+static void PrintDocument(blink::WebLocalFrame* frame, SkDocument* doc) {
const float kPageWidth = 612.0f; // 8.5 inch
const float kPageHeight = 792.0f; // 11 inch
const float kMarginTop = 29.0f; // 0.40 inch
@@ -485,7 +487,7 @@ static void PrintDocument(blink::WebFrame* frame, SkDocument* doc) {
#if defined(OS_WIN) || defined(OS_MACOSX)
float page_shrink = frame->GetPrintPageShrink(i);
- DCHECK(page_shrink > 0);
+ DCHECK_GT(page_shrink, 0);
canvas.scale(page_shrink, page_shrink);
#endif
« no previous file with comments | « components/printing/renderer/print_web_view_helper.cc ('k') | content/shell/test_runner/pixel_dump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698