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

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

Issue 10828052: Makes ui::GetSupportedScaleFactors available on platforms other than Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« 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"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 UI_EXPORT float GetScaleFactorScale(ScaleFactor scale_factor); 46 UI_EXPORT float GetScaleFactorScale(ScaleFactor scale_factor);
47 47
48 // Returns the ScaleFactor which most closely matches |scale|. 48 // Returns the ScaleFactor which most closely matches |scale|.
49 // Converting from float to ScaleFactor is inefficient and should be done as 49 // Converting from float to ScaleFactor is inefficient and should be done as
50 // little as possible. 50 // little as possible.
51 UI_EXPORT ScaleFactor GetScaleFactorFromScale(float scale); 51 UI_EXPORT ScaleFactor GetScaleFactorFromScale(float scale);
52 52
53 // Returns the ScaleFactor used by |view|. 53 // Returns the ScaleFactor used by |view|.
54 UI_EXPORT ScaleFactor GetScaleFactorForNativeView(gfx::NativeView view); 54 UI_EXPORT ScaleFactor GetScaleFactorForNativeView(gfx::NativeView view);
55 55
56 #if defined(OS_MACOSX)
57
58 // Returns a vector with the scale factors which are supported by this 56 // Returns a vector with the scale factors which are supported by this
59 // platform. 57 // platform.
60 // Only required on Mac so far.
61 UI_EXPORT std::vector<ScaleFactor> GetSupportedScaleFactors(); 58 UI_EXPORT std::vector<ScaleFactor> GetSupportedScaleFactors();
62 59
60 // Returns true if |scale_factor| is supported by this platform.
61 UI_EXPORT bool IsScaleFactorSupported(ScaleFactor scale_factor);
62
63 namespace test { 63 namespace test {
64 64
65 UI_EXPORT void SetSupportedScaleFactors( 65 UI_EXPORT void SetSupportedScaleFactors(
66 const std::vector<ScaleFactor>& scale_factors); 66 const std::vector<ScaleFactor>& scale_factors);
67 67
68 } // namespace test 68 } // namespace test
69 69
70 #endif
71
72 } // namespace ui 70 } // namespace ui
73 71
74 #endif // UI_BASE_LAYOUT_H_ 72 #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