| 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" |
| 11 #include "ui/base/ui_base_export.h" | 11 #include "ui/base/ui_base_export.h" |
| 12 #include "ui/gfx/native_widget_types.h" | 12 #include "ui/gfx/native_widget_types.h" |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 | 15 |
| 16 // Supported UI scale factors for the platform. This is used as an index | 16 // Supported UI scale factors for the platform. This is used as an index |
| 17 // into the array |kScaleFactorScales| which maps the enum value to a float. | 17 // into the array |kScaleFactorScales| which maps the enum value to a float. |
| 18 // SCALE_FACTOR_NONE is used for density independent resources such as | 18 // SCALE_FACTOR_NONE is used for density independent resources such as |
| 19 // string, html/js files or an image that can be used for any scale factors | 19 // string, html/js files or an image that can be used for any scale factors |
| 20 // (such as wallpapers). | 20 // (such as wallpapers). |
| 21 enum ScaleFactor { | 21 enum ScaleFactor { |
| 22 SCALE_FACTOR_NONE = 0, | 22 SCALE_FACTOR_NONE = 0, |
| 23 SCALE_FACTOR_100P, | 23 SCALE_FACTOR_100P, |
| 24 SCALE_FACTOR_125P, | 24 SCALE_FACTOR_125P, |
| 25 SCALE_FACTOR_133P, | 25 SCALE_FACTOR_133P, |
| 26 SCALE_FACTOR_140P, | 26 SCALE_FACTOR_140P, |
| 27 SCALE_FACTOR_150P, | 27 SCALE_FACTOR_150P, |
| 28 SCALE_FACTOR_180P, | 28 SCALE_FACTOR_180P, |
| 29 SCALE_FACTOR_200P, | 29 SCALE_FACTOR_200P, |
| 30 SCALE_FACTOR_250P, |
| 30 SCALE_FACTOR_300P, | 31 SCALE_FACTOR_300P, |
| 31 | 32 |
| 32 NUM_SCALE_FACTORS // This always appears last. | 33 NUM_SCALE_FACTORS // This always appears last. |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 // Changes the value of GetSupportedScaleFactors() to |scale_factors|. | 36 // Changes the value of GetSupportedScaleFactors() to |scale_factors|. |
| 36 // Use ScopedSetSupportedScaleFactors for unit tests as not to affect the | 37 // Use ScopedSetSupportedScaleFactors for unit tests as not to affect the |
| 37 // state of other tests. | 38 // state of other tests. |
| 38 UI_BASE_EXPORT void SetSupportedScaleFactors( | 39 UI_BASE_EXPORT void SetSupportedScaleFactors( |
| 39 const std::vector<ScaleFactor>& scale_factors); | 40 const std::vector<ScaleFactor>& scale_factors); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 std::vector<ui::ScaleFactor>* original_scale_factors_; | 72 std::vector<ui::ScaleFactor>* original_scale_factors_; |
| 72 | 73 |
| 73 DISALLOW_COPY_AND_ASSIGN(ScopedSetSupportedScaleFactors); | 74 DISALLOW_COPY_AND_ASSIGN(ScopedSetSupportedScaleFactors); |
| 74 }; | 75 }; |
| 75 | 76 |
| 76 } // namespace test | 77 } // namespace test |
| 77 | 78 |
| 78 } // namespace ui | 79 } // namespace ui |
| 79 | 80 |
| 80 #endif // UI_BASE_LAYOUT_H_ | 81 #endif // UI_BASE_LAYOUT_H_ |
| OLD | NEW |