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

Side by Side Diff: ui/base/layout.h

Issue 327503003: Added 250p scale factor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/base/layout.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | ui/base/layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698