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

Unified Diff: pdf/pdfium/pdfium_engine.cc

Issue 2270463003: Turn on enforce-in-pdf Clang plugin flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win clang Created 4 years, 4 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 | « pdf/pdfium/pdfium_engine.h ('k') | pdf/pdfium/pdfium_page.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_engine.cc
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 8461b66eccc491dd821f4cf835e66a7a186758f0..f26eb3801a9ed729e01ed6d4cc6b95858e0924b1 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <algorithm>
#include <memory>
#include <set>
@@ -2300,6 +2301,10 @@ pp::Rect PDFiumEngine::GetPageContentsRect(int index) {
return GetScreenRect(pages_[index]->rect());
}
+int PDFiumEngine::GetVerticalScrollbarYPosition() {
+ return position_.y();
+}
+
void PDFiumEngine::SetGrayscale(bool grayscale) {
render_grayscale_ = grayscale;
}
@@ -3777,6 +3782,26 @@ int CalculatePosition(FPDF_PAGE page,
} // namespace
+PDFEngineExports::RenderingSettings::RenderingSettings(int dpi_x,
+ int dpi_y,
+ const pp::Rect& bounds,
+ bool fit_to_bounds,
+ bool stretch_to_bounds,
+ bool keep_aspect_ratio,
+ bool center_in_bounds,
+ bool autorotate)
+ : dpi_x(dpi_x),
+ dpi_y(dpi_y),
+ bounds(bounds),
+ fit_to_bounds(fit_to_bounds),
+ stretch_to_bounds(stretch_to_bounds),
+ keep_aspect_ratio(keep_aspect_ratio),
+ center_in_bounds(center_in_bounds),
+ autorotate(autorotate) {}
+
+PDFEngineExports::RenderingSettings::RenderingSettings(
+ const RenderingSettings& that) = default;
+
PDFEngineExports* PDFEngineExports::Get() {
return g_pdf_engine_exports.Pointer();
}
« no previous file with comments | « pdf/pdfium/pdfium_engine.h ('k') | pdf/pdfium/pdfium_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698