| 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 class LayoutDelegate { | 10 class LayoutDelegate { |
| 11 public: | 11 public: |
| 12 enum class LayoutDistanceType { | 12 enum class LayoutDistanceType { |
| 13 // Left or right margin. |
| 14 PANEL_HORIZ_MARGIN, |
| 15 // Top or bottom margin. |
| 13 PANEL_VERT_MARGIN, | 16 PANEL_VERT_MARGIN, |
| 17 // Horizontal spacing between controls that are logically related. |
| 14 RELATED_CONTROL_HORIZONTAL_SPACING, | 18 RELATED_CONTROL_HORIZONTAL_SPACING, |
| 19 // Vertical spacing between controls that are logically related. |
| 15 RELATED_CONTROL_VERTICAL_SPACING, | 20 RELATED_CONTROL_VERTICAL_SPACING, |
| 21 // Horizontal spacing between buttons that are logically related. |
| 16 RELATED_BUTTON_HORIZONTAL_SPACING, | 22 RELATED_BUTTON_HORIZONTAL_SPACING, |
| 23 // Vertical spacing between controls that are logically unrelated. |
| 17 UNRELATED_CONTROL_VERTICAL_SPACING, | 24 UNRELATED_CONTROL_VERTICAL_SPACING, |
| 25 // Larger vertical spacing between unrelated controls. |
| 18 UNRELATED_CONTROL_LARGE_VERTICAL_SPACING, | 26 UNRELATED_CONTROL_LARGE_VERTICAL_SPACING, |
| 27 // Vertical spacing between the edge of the window and the |
| 28 // top or bottom of a button. |
| 19 BUTTON_HEDGE_MARGIN_NEW, | 29 BUTTON_HEDGE_MARGIN_NEW, |
| 30 // Horizontal spacing between the edge of the window and the |
| 31 // left or right of a button. |
| 20 BUTTON_VEDGE_MARGIN_NEW, | 32 BUTTON_VEDGE_MARGIN_NEW, |
| 33 // Indent of checkboxes relative to related text. |
| 34 CHECKBOX_INDENT, |
| 21 }; | 35 }; |
| 22 | 36 |
| 23 enum class DialogWidthType { | 37 enum class DialogWidthType { |
| 24 SMALL, | 38 SMALL, |
| 25 MEDIUM, | 39 MEDIUM, |
| 26 LARGE, | 40 LARGE, |
| 27 }; | 41 }; |
| 28 | 42 |
| 29 LayoutDelegate() {} | 43 LayoutDelegate() {} |
| 30 virtual ~LayoutDelegate() {} | 44 virtual ~LayoutDelegate() {} |
| (...skipping 28 matching lines...) Expand all Loading... |
| 59 | 73 |
| 60 // Returns the preferred width for a dialog of the specified width type. If | 74 // Returns the preferred width for a dialog of the specified width type. If |
| 61 // there is no preferred width for |type|, returns 0. | 75 // there is no preferred width for |type|, returns 0. |
| 62 virtual int GetDialogPreferredWidth(DialogWidthType type) const; | 76 virtual int GetDialogPreferredWidth(DialogWidthType type) const; |
| 63 | 77 |
| 64 private: | 78 private: |
| 65 DISALLOW_COPY_AND_ASSIGN(LayoutDelegate); | 79 DISALLOW_COPY_AND_ASSIGN(LayoutDelegate); |
| 66 }; | 80 }; |
| 67 | 81 |
| 68 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ | 82 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ |
| OLD | NEW |