| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ | 5 #ifndef UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ |
| 6 #define UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ | 6 #define UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/gfx/geometry/insets.h" | 9 #include "ui/gfx/geometry/insets.h" |
| 10 #include "ui/views/style/typography_provider.h" | 10 #include "ui/views/style/typography_provider.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 virtual gfx::Insets GetInsetsMetric(int metric) const; | 78 virtual gfx::Insets GetInsetsMetric(int metric) const; |
| 79 | 79 |
| 80 // Returns the distance metric between elements according to the given | 80 // Returns the distance metric between elements according to the given |
| 81 // enumeration element. | 81 // enumeration element. |
| 82 virtual int GetDistanceMetric(int metric) const; | 82 virtual int GetDistanceMetric(int metric) const; |
| 83 | 83 |
| 84 // Returns the TypographyProvider, used to configure text properties such as | 84 // Returns the TypographyProvider, used to configure text properties such as |
| 85 // font, weight, color, size, and line height. Never null. | 85 // font, weight, color, size, and line height. Never null. |
| 86 virtual const TypographyProvider& GetTypographyProvider() const; | 86 virtual const TypographyProvider& GetTypographyProvider() const; |
| 87 | 87 |
| 88 // Returns the actual width to use for a dialog that requires at least |
| 89 // |min_width|. |
| 90 virtual int GetSnappedDialogWidth(int min_width) const; |
| 91 |
| 88 private: | 92 private: |
| 89 DefaultTypographyProvider typography_provider_; | 93 DefaultTypographyProvider typography_provider_; |
| 90 | 94 |
| 91 DISALLOW_COPY_AND_ASSIGN(LayoutProvider); | 95 DISALLOW_COPY_AND_ASSIGN(LayoutProvider); |
| 92 }; | 96 }; |
| 93 | 97 |
| 94 } // namespace views | 98 } // namespace views |
| 95 | 99 |
| 96 #endif // UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ | 100 #endif // UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ |
| OLD | NEW |