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

Unified Diff: content/browser/renderer_host/dip_util.h

Issue 15666007: Use correct device scale factors in Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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: content/browser/renderer_host/dip_util.h
diff --git a/content/browser/renderer_host/dip_util.h b/content/browser/renderer_host/dip_util.h
index aea4c34b52c738ee208f2f2ab7bafadd09bfe22f..a7601c621300b558ec31c7f86ab18471a9cb097e 100644
--- a/content/browser/renderer_host/dip_util.h
+++ b/content/browser/renderer_host/dip_util.h
@@ -24,16 +24,22 @@ CONTENT_EXPORT ui::ScaleFactor GetScaleFactorForView(
// Utility functions that convert point/size/rect between DIP and pixel
// coordinate system.
+CONTENT_EXPORT gfx::Size ConvertSizeToDIP(float scale_factor,
+ const gfx::Size& size_in_pixel);
piman 2013/05/24 01:03:41 nit: the style guide eschews overloading... Maybe
ccameron 2013/05/24 09:45:03 Good idea -- I pruned them down to the functions t
CONTENT_EXPORT gfx::Point ConvertPointToDIP(const RenderWidgetHostView* view,
const gfx::Point& point_in_pixel);
CONTENT_EXPORT gfx::Size ConvertSizeToDIP(const RenderWidgetHostView* view,
const gfx::Size& size_in_pixel);
+CONTENT_EXPORT gfx::Rect ConvertRectToDIP(float scale_factor,
+ const gfx::Rect& rect_in_pixel);
CONTENT_EXPORT gfx::Rect ConvertRectToDIP(const RenderWidgetHostView* view,
const gfx::Rect& rect_in_pixel);
CONTENT_EXPORT gfx::Point ConvertPointToPixel(const RenderWidgetHostView* view,
const gfx::Point& point_in_dip);
CONTENT_EXPORT gfx::Size ConvertSizeToPixel(const RenderWidgetHostView* view,
const gfx::Size& size_in_dip);
+CONTENT_EXPORT gfx::Rect ConvertRectToPixel(float scale_factor,
+ const gfx::Rect& rect_in_dip);
CONTENT_EXPORT gfx::Rect ConvertRectToPixel(const RenderWidgetHostView* view,
const gfx::Rect& rect_in_dip);
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698