Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "ui/views/layout/grid_layout.h" | 8 #include "ui/views/layout/grid_layout.h" |
| 9 | 9 |
| 10 namespace views { | |
| 11 class TypographyProvider; | |
| 12 } | |
| 13 | |
| 10 class LayoutDelegate { | 14 class LayoutDelegate { |
| 11 public: | 15 public: |
| 12 enum class Metric { | 16 enum class Metric { |
| 13 // Padding on the left and right side of a button's label. | 17 // Padding on the left and right side of a button's label. |
| 14 BUTTON_HORIZONTAL_PADDING, | 18 BUTTON_HORIZONTAL_PADDING, |
| 15 // The maximum width a button can have and still influence the sizes of | 19 // The maximum width a button can have and still influence the sizes of |
| 16 // other linked buttons. This allows short buttons to have linked widths | 20 // other linked buttons. This allows short buttons to have linked widths |
| 17 // without long buttons making things overly wide. | 21 // without long buttons making things overly wide. |
| 18 BUTTON_MAX_LINKABLE_WIDTH, | 22 BUTTON_MAX_LINKABLE_WIDTH, |
| 19 // Default minimum width of a button. | 23 // Default minimum width of a button. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 // Instead of using this, create a generic solution that works for all UI | 93 // Instead of using this, create a generic solution that works for all UI |
| 90 // types, e.g. by adding a new LayoutDistance value that means what you need. | 94 // types, e.g. by adding a new LayoutDistance value that means what you need. |
| 91 // | 95 // |
| 92 // TODO(pkasting): Fix callers and remove this. | 96 // TODO(pkasting): Fix callers and remove this. |
| 93 virtual bool IsHarmonyMode() const; | 97 virtual bool IsHarmonyMode() const; |
| 94 | 98 |
| 95 // Returns the preferred width in DIPs for a dialog of the specified |width|. | 99 // Returns the preferred width in DIPs for a dialog of the specified |width|. |
| 96 // May return 0 if the dialog has no preferred width. | 100 // May return 0 if the dialog has no preferred width. |
| 97 virtual int GetDialogPreferredWidth(DialogWidth width) const; | 101 virtual int GetDialogPreferredWidth(DialogWidth width) const; |
| 98 | 102 |
| 103 // Returns the class that maps views::style (TextContext and TextStyle) to | |
|
Peter Kasting
2017/03/17 20:59:39
Nit: style -> style values (or style enums)
tapted
2017/03/20 07:33:35
Done.
| |
| 104 // specific font properties (e.g. typeface, size, color, line spacing). | |
| 105 virtual const views::TypographyProvider& GetTypographyProvider() const; | |
| 106 | |
| 99 private: | 107 private: |
| 100 DISALLOW_COPY_AND_ASSIGN(LayoutDelegate); | 108 DISALLOW_COPY_AND_ASSIGN(LayoutDelegate); |
| 101 }; | 109 }; |
| 102 | 110 |
| 103 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ | 111 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ |
| OLD | NEW |