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

Unified Diff: ui/base/layout_mac.mm

Issue 10828052: Makes ui::GetSupportedScaleFactors available on platforms other than Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « ui/base/layout.cc ('k') | ui/base/resource/resource_bundle_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/layout_mac.mm
diff --git a/ui/base/layout_mac.mm b/ui/base/layout_mac.mm
index 70ece0ab4924e0d4b3032a227af8e373fb7a42ff..1429f3686454901923077e7021976d58994c9e15 100644
--- a/ui/base/layout_mac.mm
+++ b/ui/base/layout_mac.mm
@@ -16,16 +16,6 @@
namespace {
-std::vector<ui::ScaleFactor>& GetSupportedScaleFactorsInternal() {
- static std::vector<ui::ScaleFactor>* supported_scale_factors =
- new std::vector<ui::ScaleFactor>();
- if (supported_scale_factors->empty()) {
- supported_scale_factors->push_back(ui::SCALE_FACTOR_100P);
- supported_scale_factors->push_back(ui::SCALE_FACTOR_200P);
- }
- return *supported_scale_factors;
-}
-
float GetScaleFactorScaleForNativeView(gfx::NativeView view) {
float scale_factor = 1.0f;
if (NSWindow* window = [view window]) {
@@ -49,19 +39,4 @@ ScaleFactor GetScaleFactorForNativeView(gfx::NativeView view) {
return GetScaleFactorFromScale(GetScaleFactorScaleForNativeView(view));
}
-std::vector<ScaleFactor> GetSupportedScaleFactors() {
- return GetSupportedScaleFactorsInternal();
-}
-
-namespace test {
-
-void SetSupportedScaleFactors(
- const std::vector<ui::ScaleFactor>& scale_factors) {
- std::vector<ui::ScaleFactor>& supported_scale_factors =
- GetSupportedScaleFactorsInternal();
- supported_scale_factors = scale_factors;
-}
-
-} // namespace test
-
} // namespace ui
« no previous file with comments | « ui/base/layout.cc ('k') | ui/base/resource/resource_bundle_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698