| 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_CHROME_LAYOUT_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_LAYOUT_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_LAYOUT_PROVIDER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_LAYOUT_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "ui/gfx/geometry/insets.h" | 11 #include "ui/gfx/geometry/insets.h" |
| 12 #include "ui/views/layout/grid_layout.h" | 12 #include "ui/views/layout/grid_layout.h" |
| 13 #include "ui/views/layout/layout_provider.h" | 13 #include "ui/views/layout/layout_provider.h" |
| 14 | 14 |
| 15 enum ChromeDistanceMetric { | 15 enum ChromeDistanceMetric { |
| 16 // The maximum width a button can have and still influence the sizes of | 16 // The maximum width a button can have and still influence the sizes of |
| 17 // other linked buttons. This allows short buttons to have linked widths | 17 // other linked buttons. This allows short buttons to have linked widths |
| 18 // without long buttons making things overly wide. | 18 // without long buttons making things overly wide. |
| 19 DISTANCE_BUTTON_MAX_LINKABLE_WIDTH = views::VIEWS_DISTANCE_END, | 19 DISTANCE_BUTTON_MAX_LINKABLE_WIDTH = views::VIEWS_DISTANCE_END, |
| 20 // Default minimum width of a button. | 20 // Default minimum width of a button. |
| 21 DISTANCE_BUTTON_MINIMUM_WIDTH, | 21 DISTANCE_BUTTON_MINIMUM_WIDTH, |
| 22 // Vertical spacing between a list of multiple controls in one column. |
| 23 DISTANCE_CONTROL_LIST_VERTICAL, |
| 22 // Margin between the edge of a dialog and the left, right, or bottom of a | 24 // Margin between the edge of a dialog and the left, right, or bottom of a |
| 23 // contained button. | 25 // contained button. |
| 24 DISTANCE_DIALOG_BUTTON_MARGIN, | 26 DISTANCE_DIALOG_BUTTON_MARGIN, |
| 25 // Spacing between a dialog button and the content above it. | 27 // Spacing between a dialog button and the content above it. |
| 26 DISTANCE_DIALOG_BUTTON_TOP, | 28 DISTANCE_DIALOG_BUTTON_TOP, |
| 27 // Horizontal or vertical margin between the edge of a panel and the | 29 // Horizontal or vertical margin between the edge of a panel and the |
| 28 // contained content. | 30 // contained content. |
| 29 DISTANCE_PANEL_CONTENT_MARGIN, | 31 DISTANCE_PANEL_CONTENT_MARGIN, |
| 30 // Smaller horizontal spacing between other controls that are logically | 32 // Smaller horizontal spacing between other controls that are logically |
| 31 // related. | 33 // related. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 94 |
| 93 // Returns the preferred width in DIPs for a dialog of the specified |width|. | 95 // Returns the preferred width in DIPs for a dialog of the specified |width|. |
| 94 // May return 0 if the dialog has no preferred width. | 96 // May return 0 if the dialog has no preferred width. |
| 95 virtual int GetDialogPreferredWidth(DialogWidth width) const; | 97 virtual int GetDialogPreferredWidth(DialogWidth width) const; |
| 96 | 98 |
| 97 private: | 99 private: |
| 98 DISALLOW_COPY_AND_ASSIGN(ChromeLayoutProvider); | 100 DISALLOW_COPY_AND_ASSIGN(ChromeLayoutProvider); |
| 99 }; | 101 }; |
| 100 | 102 |
| 101 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_LAYOUT_PROVIDER_H_ | 103 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_CHROME_LAYOUT_PROVIDER_H_ |
| OLD | NEW |