| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/base/layout.h" | 5 #include "ui/base/layout.h" |
| 6 | 6 |
| 7 #include <Cocoa/Cocoa.h> | 7 #include <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/mac/sdk_forward_declarations.h" | 9 #include "base/mac/sdk_forward_declarations.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 NSScreen* screen = [screens objectAtIndex:0]; | 24 NSScreen* screen = [screens objectAtIndex:0]; |
| 25 if ([screen respondsToSelector:@selector(backingScaleFactor)]) | 25 if ([screen respondsToSelector:@selector(backingScaleFactor)]) |
| 26 return [screen backingScaleFactor]; | 26 return [screen backingScaleFactor]; |
| 27 return [screen userSpaceScaleFactor]; | 27 return [screen userSpaceScaleFactor]; |
| 28 } | 28 } |
| 29 | 29 |
| 30 } // namespace | 30 } // namespace |
| 31 | 31 |
| 32 namespace ui { | 32 namespace ui { |
| 33 | 33 |
| 34 ScaleFactor GetScaleFactorForNativeView(gfx::NativeView view) { | 34 float GetScaleFactorForNativeView(gfx::NativeView view) { |
| 35 return GetSupportedScaleFactor(GetScaleFactorScaleForNativeView(view)); | 35 return GetScaleFactorScaleForNativeView(view); |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace ui | 38 } // namespace ui |
| OLD | NEW |