OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" | 5 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
6 | 6 |
7 #include "base/timer/timer.h" | 7 #include "base/timer/timer.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_finder.h" | 10 #include "chrome/browser/ui/browser_finder.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 int full_width = kDesiredBubbleWidth - (2 * views::kPanelHorizMargin); | 82 int full_width = kDesiredBubbleWidth - (2 * views::kPanelHorizMargin); |
83 switch (type) { | 83 switch (type) { |
84 case SINGLE_VIEW_COLUMN_SET: | 84 case SINGLE_VIEW_COLUMN_SET: |
85 column_set->AddColumn(views::GridLayout::FILL, | 85 column_set->AddColumn(views::GridLayout::FILL, |
86 views::GridLayout::FILL, | 86 views::GridLayout::FILL, |
87 0, | 87 0, |
88 views::GridLayout::FIXED, | 88 views::GridLayout::FIXED, |
89 full_width, | 89 full_width, |
90 0); | 90 0); |
91 break; | 91 break; |
92 | |
93 case DOUBLE_BUTTON_COLUMN_SET: | 92 case DOUBLE_BUTTON_COLUMN_SET: |
94 column_set->AddColumn(views::GridLayout::TRAILING, | 93 column_set->AddColumn(views::GridLayout::TRAILING, |
95 views::GridLayout::CENTER, | 94 views::GridLayout::CENTER, |
96 1, | 95 1, |
97 views::GridLayout::USE_PREF, | 96 views::GridLayout::USE_PREF, |
98 0, | 97 0, |
99 0); | 98 0); |
100 column_set->AddPaddingColumn(0, views::kRelatedButtonHSpacing); | 99 column_set->AddPaddingColumn(0, views::kRelatedButtonHSpacing); |
101 column_set->AddColumn(views::GridLayout::TRAILING, | 100 column_set->AddColumn(views::GridLayout::TRAILING, |
102 views::GridLayout::CENTER, | 101 views::GridLayout::CENTER, |
(...skipping 17 matching lines...) Expand all Loading... |
120 0, | 119 0, |
121 0); | 120 0); |
122 break; | 121 break; |
123 case SINGLE_BUTTON_COLUMN_SET: | 122 case SINGLE_BUTTON_COLUMN_SET: |
124 column_set->AddColumn(views::GridLayout::TRAILING, | 123 column_set->AddColumn(views::GridLayout::TRAILING, |
125 views::GridLayout::CENTER, | 124 views::GridLayout::CENTER, |
126 1, | 125 1, |
127 views::GridLayout::USE_PREF, | 126 views::GridLayout::USE_PREF, |
128 0, | 127 0, |
129 0); | 128 0); |
| 129 break; |
130 case TRIPLE_BUTTON_COLUMN_SET: | 130 case TRIPLE_BUTTON_COLUMN_SET: |
131 column_set->AddColumn(views::GridLayout::LEADING, | 131 column_set->AddColumn(views::GridLayout::LEADING, |
132 views::GridLayout::CENTER, | 132 views::GridLayout::CENTER, |
133 1, | 133 1, |
134 views::GridLayout::USE_PREF, | 134 views::GridLayout::USE_PREF, |
135 0, | 135 0, |
136 0); | 136 0); |
137 column_set->AddPaddingColumn(0, views::kRelatedButtonHSpacing); | 137 column_set->AddPaddingColumn(0, views::kRelatedButtonHSpacing); |
138 column_set->AddColumn(views::GridLayout::TRAILING, | 138 column_set->AddColumn(views::GridLayout::TRAILING, |
139 views::GridLayout::CENTER, | 139 views::GridLayout::CENTER, |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() { | 1196 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() { |
1197 if (model()->local_credentials().empty()) { | 1197 if (model()->local_credentials().empty()) { |
1198 // Skip confirmation if there are no existing passwords for this site. | 1198 // Skip confirmation if there are no existing passwords for this site. |
1199 NotifyConfirmedNeverForThisSite(); | 1199 NotifyConfirmedNeverForThisSite(); |
1200 } else { | 1200 } else { |
1201 model()->OnConfirmationForNeverForThisSite(); | 1201 model()->OnConfirmationForNeverForThisSite(); |
1202 Refresh(); | 1202 Refresh(); |
1203 SizeToContents(); | 1203 SizeToContents(); |
1204 } | 1204 } |
1205 } | 1205 } |
OLD | NEW |