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

Unified Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h

Issue 218993006: Extracting the remaining ManagePasswordsBubbleView::Init code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vabr feedback. Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h
index 2564edd1ffc3914b85ea0e84cbac11e8612e8890..0eaefe5b07c64f22d7aad0caa0e39449df934072 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h
@@ -21,6 +21,7 @@ class WebContents;
namespace views {
class BlueButton;
class LabelButton;
+class GridLayout;
}
class ManagePasswordsBubbleView : public views::BubbleDelegateView,
@@ -40,11 +41,26 @@ class ManagePasswordsBubbleView : public views::BubbleDelegateView,
static bool IsShowing();
private:
+ enum ColumnSetType {
+ // | | (FILL, FILL) | |
+ // Used for the bubble's header, the credentials list, and for simple
+ // messages like "No passwords".
+ SINGLE_VIEW_COLUMN_SET = 0,
+
+ // | | (TRAILING, CENTER) | | (TRAILING, CENTER) | |
+ // Used for buttons and links at the bottom of the bubble.
+ DOUBLE_VIEW_COLUMN_SET = 1,
+ };
+
ManagePasswordsBubbleView(content::WebContents* web_contents,
views::View* anchor_view,
ManagePasswordsIconView* icon_view);
virtual ~ManagePasswordsBubbleView();
+ // Construct an appropriate ColumnSet for the given |type|, and add it
+ // to |layout|.
+ void BuildColumnSet(views::GridLayout* layout, ColumnSetType type);
+
// Returns the maximum width needed to display the longest value in the
// |type| field.
int GetMaximumFieldWidth(FieldType type);

Powered by Google App Engine
This is Rietveld 408576698