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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 469833003: Cannot preview PDFs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 8fd551c5782ace2c6569aa82bdef92e2642a8c22..cbd3b07d531095024fabee7af585a3bbf61bad68 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -402,28 +402,28 @@ public:
virtual ~ChromePluginPrintContext() { }
- virtual void begin(float width, float height)
+ virtual void begin(float width, float height) OVERRIDE
{
}
- virtual void end()
+ virtual void end() OVERRIDE
{
m_plugin->printEnd();
}
- virtual float getPageShrink(int pageNumber) const
+ virtual float getPageShrink(int pageNumber) const OVERRIDE
{
// We don't shrink the page (maybe we should ask the widget ??)
return 1.0;
}
- virtual void computePageRects(const FloatRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight)
+ virtual void computePageRects(const FloatRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight) OVERRIDE
{
m_printParams.printContentArea = IntRect(printRect);
m_pageCount = m_plugin->printBegin(m_printParams);
}
- virtual int pageCount() const
+ virtual size_t pageCount() const OVERRIDE
{
return m_pageCount;
}
@@ -432,7 +432,7 @@ protected:
// Spools the printed page, a subrect of frame(). Skip the scale step.
// NativeTheme doesn't play well with scaling. Scaling is done browser side
// instead. Returns the scale to be applied.
- virtual float spoolPage(GraphicsContext& context, int pageNumber)
+ virtual float spoolPage(GraphicsContext& context, int pageNumber) OVERRIDE
{
m_plugin->printPage(pageNumber, &context);
return 1.0;
@@ -441,7 +441,7 @@ protected:
private:
// Set when printing.
WebPluginContainerImpl* m_plugin;
- int m_pageCount;
+ size_t m_pageCount;
WebPrintParams m_printParams;
};
@@ -1281,7 +1281,7 @@ int WebLocalFrameImpl::printBegin(const WebPrintParams& printParams, const WebNo
// browser. pageHeight is actually an output parameter.
m_printContext->computePageRects(rect, 0, 0, 1.0, pageHeight);
- return m_printContext->pageCount();
+ return static_cast<int>(m_printContext->pageCount());
}
float WebLocalFrameImpl::getPrintPageShrink(int page)

Powered by Google App Engine
This is Rietveld 408576698