| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 virtual gfx::Insets GetInsetsMetric(int metric) const; | 76 virtual gfx::Insets GetInsetsMetric(int metric) const; |
| 77 | 77 |
| 78 // Returns the distance metric between elements according to the given | 78 // Returns the distance metric between elements according to the given |
| 79 // enumeration element. | 79 // enumeration element. |
| 80 virtual int GetDistanceMetric(int metric) const; | 80 virtual int GetDistanceMetric(int metric) const; |
| 81 | 81 |
| 82 // Returns the TypographyProvider, used to configure text properties such as | 82 // Returns the TypographyProvider, used to configure text properties such as |
| 83 // font, weight, color, size, and line height. Never null. | 83 // font, weight, color, size, and line height. Never null. |
| 84 virtual const TypographyProvider& GetTypographyProvider() const; | 84 virtual const TypographyProvider& GetTypographyProvider() const; |
| 85 | 85 |
| 86 // Returns the actual width to use for a dialog that requires at least |
| 87 // |min_width|. |
| 88 virtual int GetSnappedDialogWidth(int min_width) const; |
| 89 |
| 86 private: | 90 private: |
| 87 DefaultTypographyProvider typography_provider_; | 91 DefaultTypographyProvider typography_provider_; |
| 88 | 92 |
| 89 DISALLOW_COPY_AND_ASSIGN(LayoutProvider); | 93 DISALLOW_COPY_AND_ASSIGN(LayoutProvider); |
| 90 }; | 94 }; |
| 91 | 95 |
| 92 } // namespace views | 96 } // namespace views |
| 93 | 97 |
| 94 #endif // UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ | 98 #endif // UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ |
| OLD | NEW |