Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: chrome/browser/ui/views/harmony/layout_delegate.h

Issue 2660553005: Harmony - convert hung renderer dialog. (Closed)
Patch Set: disable dialog test on osx Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 Metric { 12 enum class Metric {
13 // Padding on the left and right side of a button's label.
14 BUTTON_HORIZONTAL_PADDING,
13 // Margin between the edge of a dialog and the left, right, or bottom of a 15 // Margin between the edge of a dialog and the left, right, or bottom of a
14 // contained button. 16 // contained button.
15 DIALOG_BUTTON_MARGIN, 17 DIALOG_BUTTON_MARGIN,
16 // In theory, this is the spacing between a dialog button and the content 18 // Minimum width of a dialog button.
17 // above it. In practice, what the code does with this value, at least 19 DIALOG_BUTTON_MINIMUM_WIDTH,
18 // pre-Harmony, defies easy explanation. 20 // Spacing between a dialog button and the content above it.
19 DIALOG_BUTTON_TOP_SPACING, 21 DIALOG_BUTTON_TOP_SPACING,
20 // Horizontal or vertical margin between the edge of a dialog and the close 22 // Horizontal or vertical margin between the edge of a dialog and the close
21 // button in the upper trailing corner. 23 // button in the upper trailing corner.
22 DIALOG_CLOSE_BUTTON_MARGIN, 24 DIALOG_CLOSE_BUTTON_MARGIN,
23 // Horizontal or vertical margin between the edge of a panel and the 25 // Horizontal or vertical margin between the edge of a panel and the
24 // contained content. 26 // contained content.
25 PANEL_CONTENT_MARGIN, 27 PANEL_CONTENT_MARGIN,
26 // Horizontal spacing between buttons that are logically related, e.g. 28 // Horizontal spacing between buttons that are logically related, e.g.
27 // for a button set. 29 // for a button set.
28 RELATED_BUTTON_HORIZONTAL_SPACING, 30 RELATED_BUTTON_HORIZONTAL_SPACING,
29 // Horizontal spacing between other controls that are logically related. 31 // Horizontal spacing between other controls that are logically related.
30 RELATED_CONTROL_HORIZONTAL_SPACING, 32 RELATED_CONTROL_HORIZONTAL_SPACING,
31 // Vertical spacing between controls that are logically related. 33 // Vertical spacing between controls that are logically related.
32 RELATED_CONTROL_VERTICAL_SPACING, 34 RELATED_CONTROL_VERTICAL_SPACING,
33 // Horizontal spacing between an item such as an icon or checkbox and a 35 // Horizontal spacing between an item such as an icon or checkbox and a
34 // label related to it. 36 // label related to it.
35 RELATED_LABEL_HORIZONTAL_SPACING, 37 RELATED_LABEL_HORIZONTAL_SPACING,
36 // Horizontal indent of a subsection relative to related items above, e.g. 38 // Horizontal indent of a subsection relative to related items above, e.g.
37 // checkboxes below explanatory text/headings. 39 // checkboxes below explanatory text/headings.
38 SUBSECTION_HORIZONTAL_INDENT, 40 SUBSECTION_HORIZONTAL_INDENT,
41 // Horizontal spacing between controls that are logically unrelated.
42 UNRELATED_CONTROL_HORIZONTAL_SPACING,
43 // Larger horizontal spacing between unrelated controls.
44 UNRELATED_CONTROL_HORIZONTAL_SPACING_LARGE,
39 // Vertical spacing between controls that are logically unrelated. 45 // Vertical spacing between controls that are logically unrelated.
40 UNRELATED_CONTROL_VERTICAL_SPACING, 46 UNRELATED_CONTROL_VERTICAL_SPACING,
41 // Larger vertical spacing between unrelated controls. 47 // Larger vertical spacing between unrelated controls.
42 UNRELATED_CONTROL_VERTICAL_SPACING_LARGE, 48 UNRELATED_CONTROL_VERTICAL_SPACING_LARGE,
43 }; 49 };
44 50
45 enum class DialogWidth { 51 enum class DialogWidth {
46 SMALL, 52 SMALL,
47 MEDIUM, 53 MEDIUM,
48 LARGE, 54 LARGE,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 88
83 // Returns the preferred width in DIPs for a dialog of the specified |width|. 89 // Returns the preferred width in DIPs for a dialog of the specified |width|.
84 // May return 0 if the dialog has no preferred width. 90 // May return 0 if the dialog has no preferred width.
85 virtual int GetDialogPreferredWidth(DialogWidth width) const; 91 virtual int GetDialogPreferredWidth(DialogWidth width) const;
86 92
87 private: 93 private:
88 DISALLOW_COPY_AND_ASSIGN(LayoutDelegate); 94 DISALLOW_COPY_AND_ASSIGN(LayoutDelegate);
89 }; 95 };
90 96
91 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_ 97 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_LAYOUT_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/harmony/harmony_layout_delegate.cc ('k') | chrome/browser/ui/views/harmony/layout_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698