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 #ifndef UI_BASE_LAYOUT_H_ | 5 #ifndef UI_BASE_LAYOUT_H_ |
6 #define UI_BASE_LAYOUT_H_ | 6 #define UI_BASE_LAYOUT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 }; | 42 }; |
43 | 43 |
44 // Returns the float scale value for |scale_factor|. | 44 // Returns the float scale value for |scale_factor|. |
45 UI_EXPORT float GetScaleFactorScale(ScaleFactor scale_factor); | 45 UI_EXPORT float GetScaleFactorScale(ScaleFactor scale_factor); |
46 | 46 |
47 // Returns the ScaleFactor which most closely matches |scale|. | 47 // Returns the ScaleFactor which most closely matches |scale|. |
48 // Converting from float to ScaleFactor is inefficient and should be done as | 48 // Converting from float to ScaleFactor is inefficient and should be done as |
49 // little as possible. | 49 // little as possible. |
50 UI_EXPORT ScaleFactor GetScaleFactorFromScale(float scale); | 50 UI_EXPORT ScaleFactor GetScaleFactorFromScale(float scale); |
51 | 51 |
52 #if defined(OS_MACOSX) | |
53 | |
54 // Returns a vector with the scale factors which are supported by this | 52 // Returns a vector with the scale factors which are supported by this |
55 // platform. | 53 // platform. |
56 // Only required on Mac so far. | |
57 UI_EXPORT std::vector<ScaleFactor> GetSupportedScaleFactors(); | 54 UI_EXPORT std::vector<ScaleFactor> GetSupportedScaleFactors(); |
58 | 55 |
59 namespace test { | 56 namespace test { |
60 | 57 |
61 UI_EXPORT void SetSupportedScaleFactors( | 58 UI_EXPORT void SetSupportedScaleFactors( |
62 const std::vector<ScaleFactor>& scale_factors); | 59 const std::vector<ScaleFactor>& scale_factors); |
63 | 60 |
64 } // namespace test | 61 } // namespace test |
65 | 62 |
66 #endif | |
67 | |
68 } // namespace ui | 63 } // namespace ui |
69 | 64 |
70 #endif // UI_BASE_LAYOUT_H_ | 65 #endif // UI_BASE_LAYOUT_H_ |
OLD | NEW |