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

Unified Diff: ui/base/layout.h

Issue 10823067: Add a function to layout.h for getting ScaleFactor of the native view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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: ui/base/layout.h
diff --git a/ui/base/layout.h b/ui/base/layout.h
index 2349693779237879469147b2aa16407a8013bfb5..447dfacc1cada26bfdb75d26951aa1c0390c56e5 100644
--- a/ui/base/layout.h
+++ b/ui/base/layout.h
@@ -9,6 +9,7 @@
#include "build/build_config.h"
#include "ui/base/ui_export.h"
+#include "ui/gfx/native_widget_types.h"
namespace ui {
@@ -49,6 +50,9 @@ UI_EXPORT float GetScaleFactorScale(ScaleFactor scale_factor);
// little as possible.
UI_EXPORT ScaleFactor GetScaleFactorFromScale(float scale);
+// Returns the ScaleFactor used by |view|.
+UI_EXPORT ScaleFactor GetScaleFactorForNativeView(gfx::NativeView view);
+
#if defined(OS_MACOSX)
// Returns a vector with the scale factors which are supported by this

Powered by Google App Engine
This is Rietveld 408576698