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

Unified Diff: printing/custom_scaling.h

Issue 10348002: ugrr... Fixing printing scaling again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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_win.cc ('k') | printing/custom_scaling.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/custom_scaling.h
===================================================================
--- printing/custom_scaling.h (revision 0)
+++ printing/custom_scaling.h (revision 0)
@@ -0,0 +1,33 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PRINTING_CUSTOM_SCALING_H_
+#define PRINTING_CUSTOM_SCALING_H_
+
+#include "printing/printing_export.h"
+
+namespace printing {
+
+// This set of function allows plugin to set custom printing scale in the
+// thread local storage. It is a hack to pass scale through this, but
+// alternative is to do major refactoring to pass this scale factor all the
+// from plugin through webkit to the upper level.
+// We should definitely revisit this approach in favor of better implementation
+// later. In the mean time, this looks like a simplest way fixing printing
+// issues now.
+
+// Gets custom printing scale from the TLS. Return false if it has not been
+// set.
+PRINTING_EXPORT bool GetCustomPrintingPageScale(double* scale);
+
+// Sets custom printing scale in TLS.
+PRINTING_EXPORT void SetCustomPrintingPageScale(double scale);
+
+// Clears custom printing scale in TLS.
+PRINTING_EXPORT void ClearCustomPrintingPageScale();
+
+} // namespace printing
+
+#endif // PRINTING_CUSTOM_SCALING_H_
+
« no previous file with comments | « chrome/renderer/print_web_view_helper_win.cc ('k') | printing/custom_scaling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698