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 enum DisplayLayout { | |
17 // The typical layout for e.g. Windows, Mac and Linux. | |
18 LAYOUT_DESKTOP, | |
19 | |
20 // Layout optimized for touch. Used e.g. for Windows 8 Metro mode. | |
21 LAYOUT_TOUCH, | |
22 }; | |
23 | |
24 // Returns the display layout that should be used. This could be used | |
25 // e.g. to tweak hard-coded padding that's layout specific, or choose | |
26 // the .pak file of theme resources to load. | |
27 // WARNING: this is deprecated and will be nuked as soon as aura is the default | |
28 // on windows. | |
29 UI_BASE_EXPORT DisplayLayout GetDisplayLayout(); | |
30 | |
31 // 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 |
32 // 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. |
33 // SCALE_FACTOR_NONE is used for density independent resources such as | 18 // SCALE_FACTOR_NONE is used for density independent resources such as |
34 // 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 |
35 // (such as wallpapers). | 20 // (such as wallpapers). |
36 enum ScaleFactor { | 21 enum ScaleFactor { |
37 SCALE_FACTOR_NONE = 0, | 22 SCALE_FACTOR_NONE = 0, |
38 SCALE_FACTOR_100P, | 23 SCALE_FACTOR_100P, |
39 SCALE_FACTOR_125P, | 24 SCALE_FACTOR_125P, |
40 SCALE_FACTOR_133P, | 25 SCALE_FACTOR_133P, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 std::vector<ui::ScaleFactor>* original_scale_factors_; | 79 std::vector<ui::ScaleFactor>* original_scale_factors_; |
95 | 80 |
96 DISALLOW_COPY_AND_ASSIGN(ScopedSetSupportedScaleFactors); | 81 DISALLOW_COPY_AND_ASSIGN(ScopedSetSupportedScaleFactors); |
97 }; | 82 }; |
98 | 83 |
99 } // namespace test | 84 } // namespace test |
100 | 85 |
101 } // namespace ui | 86 } // namespace ui |
102 | 87 |
103 #endif // UI_BASE_LAYOUT_H_ | 88 #endif // UI_BASE_LAYOUT_H_ |
OLD | NEW |