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

Side by Side Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc

Issue 2869683003: Views/Harmony: Remove references to layout constants in c/b/u/v/passwords. (Closed)
Patch Set: Created 3 years, 7 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 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/macros.h" 7 #include "base/macros.h"
8 #include "base/metrics/user_metrics.h" 8 #include "base/metrics/user_metrics.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 21 matching lines...) Expand all
32 #include "ui/native_theme/native_theme.h" 32 #include "ui/native_theme/native_theme.h"
33 #include "ui/views/controls/button/blue_button.h" 33 #include "ui/views/controls/button/blue_button.h"
34 #include "ui/views/controls/button/md_text_button.h" 34 #include "ui/views/controls/button/md_text_button.h"
35 #include "ui/views/controls/link.h" 35 #include "ui/views/controls/link.h"
36 #include "ui/views/controls/link_listener.h" 36 #include "ui/views/controls/link_listener.h"
37 #include "ui/views/controls/separator.h" 37 #include "ui/views/controls/separator.h"
38 #include "ui/views/controls/styled_label.h" 38 #include "ui/views/controls/styled_label.h"
39 #include "ui/views/controls/styled_label_listener.h" 39 #include "ui/views/controls/styled_label_listener.h"
40 #include "ui/views/layout/fill_layout.h" 40 #include "ui/views/layout/fill_layout.h"
41 #include "ui/views/layout/grid_layout.h" 41 #include "ui/views/layout/grid_layout.h"
42 #include "ui/views/layout/layout_constants.h"
43 #include "ui/views/widget/widget.h" 42 #include "ui/views/widget/widget.h"
44 43
45 #if !defined(OS_MACOSX) || BUILDFLAG(MAC_VIEWS_BROWSER) 44 #if !defined(OS_MACOSX) || BUILDFLAG(MAC_VIEWS_BROWSER)
46 #include "chrome/browser/ui/views/frame/browser_view.h" 45 #include "chrome/browser/ui/views/frame/browser_view.h"
47 #endif 46 #endif
48 47
49 #if defined(OS_WIN) 48 #if defined(OS_WIN)
50 #include "chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bu bble_view.h" 49 #include "chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bu bble_view.h"
51 #endif 50 #endif
52 51
(...skipping 29 matching lines...) Expand all
82 TRIPLE_BUTTON_COLUMN_SET, 81 TRIPLE_BUTTON_COLUMN_SET,
83 }; 82 };
84 83
85 enum TextRowType { ROW_SINGLE, ROW_MULTILINE }; 84 enum TextRowType { ROW_SINGLE, ROW_MULTILINE };
86 85
87 // Construct an appropriate ColumnSet for the given |type|, and add it 86 // Construct an appropriate ColumnSet for the given |type|, and add it
88 // to |layout|. 87 // to |layout|.
89 void BuildColumnSet(views::GridLayout* layout, ColumnSetType type) { 88 void BuildColumnSet(views::GridLayout* layout, ColumnSetType type) {
90 views::ColumnSet* column_set = layout->AddColumnSet(type); 89 views::ColumnSet* column_set = layout->AddColumnSet(type);
91 int full_width = ManagePasswordsBubbleView::kDesiredBubbleWidth; 90 int full_width = ManagePasswordsBubbleView::kDesiredBubbleWidth;
91 const int button_divider = ChromeLayoutProvider::Get()->GetDistanceMetric(
92 views::DISTANCE_RELATED_BUTTON_HORIZONTAL);
92 switch (type) { 93 switch (type) {
93 case SINGLE_VIEW_COLUMN_SET: 94 case SINGLE_VIEW_COLUMN_SET:
94 column_set->AddColumn(views::GridLayout::FILL, 95 column_set->AddColumn(views::GridLayout::FILL,
95 views::GridLayout::FILL, 96 views::GridLayout::FILL,
96 0, 97 0,
97 views::GridLayout::FIXED, 98 views::GridLayout::FIXED,
98 full_width, 99 full_width,
99 0); 100 0);
100 break; 101 break;
101 case DOUBLE_BUTTON_COLUMN_SET: 102 case DOUBLE_BUTTON_COLUMN_SET:
102 column_set->AddColumn(views::GridLayout::TRAILING, 103 column_set->AddColumn(views::GridLayout::TRAILING,
103 views::GridLayout::CENTER, 104 views::GridLayout::CENTER,
104 1, 105 1,
105 views::GridLayout::USE_PREF, 106 views::GridLayout::USE_PREF,
106 0, 107 0,
107 0); 108 0);
108 column_set->AddPaddingColumn(0, views::kRelatedButtonHSpacing); 109 column_set->AddPaddingColumn(0, button_divider);
109 column_set->AddColumn(views::GridLayout::TRAILING, 110 column_set->AddColumn(views::GridLayout::TRAILING,
110 views::GridLayout::CENTER, 111 views::GridLayout::CENTER,
111 0, 112 0,
112 views::GridLayout::USE_PREF, 113 views::GridLayout::USE_PREF,
113 0, 114 0,
114 0); 115 0);
115 break; 116 break;
116 case LINK_BUTTON_COLUMN_SET: 117 case LINK_BUTTON_COLUMN_SET:
117 column_set->AddColumn(views::GridLayout::LEADING, 118 column_set->AddColumn(views::GridLayout::LEADING,
118 views::GridLayout::CENTER, 119 views::GridLayout::CENTER,
119 1, 120 1,
120 views::GridLayout::USE_PREF, 121 views::GridLayout::USE_PREF,
121 0, 122 0,
122 0); 123 0);
123 column_set->AddPaddingColumn(0, views::kRelatedButtonHSpacing); 124 column_set->AddPaddingColumn(0, button_divider);
124 column_set->AddColumn(views::GridLayout::TRAILING, 125 column_set->AddColumn(views::GridLayout::TRAILING,
125 views::GridLayout::CENTER, 126 views::GridLayout::CENTER,
126 0, 127 0,
127 views::GridLayout::USE_PREF, 128 views::GridLayout::USE_PREF,
128 0, 129 0,
129 0); 130 0);
130 break; 131 break;
131 case SINGLE_BUTTON_COLUMN_SET: 132 case SINGLE_BUTTON_COLUMN_SET:
132 column_set->AddColumn(views::GridLayout::TRAILING, 133 column_set->AddColumn(views::GridLayout::TRAILING,
133 views::GridLayout::CENTER, 134 views::GridLayout::CENTER,
134 1, 135 1,
135 views::GridLayout::USE_PREF, 136 views::GridLayout::USE_PREF,
136 0, 137 0,
137 0); 138 0);
138 break; 139 break;
139 case TRIPLE_BUTTON_COLUMN_SET: 140 case TRIPLE_BUTTON_COLUMN_SET:
140 column_set->AddColumn(views::GridLayout::LEADING, 141 column_set->AddColumn(views::GridLayout::LEADING,
141 views::GridLayout::CENTER, 142 views::GridLayout::CENTER,
142 1, 143 1,
143 views::GridLayout::USE_PREF, 144 views::GridLayout::USE_PREF,
144 0, 145 0,
145 0); 146 0);
146 column_set->AddPaddingColumn(0, views::kRelatedButtonHSpacing); 147 column_set->AddPaddingColumn(0, button_divider);
147 column_set->AddColumn(views::GridLayout::TRAILING, 148 column_set->AddColumn(views::GridLayout::TRAILING,
148 views::GridLayout::CENTER, 149 views::GridLayout::CENTER,
149 0, 150 0,
150 views::GridLayout::USE_PREF, 151 views::GridLayout::USE_PREF,
151 0, 152 0,
152 0); 153 0);
153 column_set->AddPaddingColumn(0, views::kRelatedButtonHSpacing); 154 column_set->AddPaddingColumn(0, button_divider);
154 column_set->AddColumn(views::GridLayout::TRAILING, 155 column_set->AddColumn(views::GridLayout::TRAILING,
155 views::GridLayout::CENTER, 156 views::GridLayout::CENTER,
156 0, 157 0,
157 views::GridLayout::USE_PREF, 158 views::GridLayout::USE_PREF,
158 0, 159 0,
159 0); 160 0);
160 break; 161 break;
161 } 162 }
162 } 163 }
163 164
164 views::StyledLabel::RangeStyleInfo GetLinkStyle() { 165 views::StyledLabel::RangeStyleInfo GetLinkStyle() {
165 auto result = views::StyledLabel::RangeStyleInfo::CreateForLink(); 166 auto result = views::StyledLabel::RangeStyleInfo::CreateForLink();
166 result.disable_line_wrapping = false; 167 result.disable_line_wrapping = false;
167 return result; 168 return result;
168 } 169 }
169 170
170 // If a special title is required (i.e. one that contains links), creates a 171 // If a special title is required (i.e. one that contains links), creates a
171 // title view and a row for it in |layout|. 172 // title view and a row for it in |layout|.
172 // TODO(estade): this should be removed and a replaced by a normal title (via 173 // TODO(estade): this should be removed and a replaced by a normal title (via
173 // GetWindowTitle). 174 // GetWindowTitle).
174 void AddTitleRowWithLink(views::GridLayout* layout, 175 void AddTitleRowWithLink(views::GridLayout* layout,
175 ManagePasswordsBubbleModel* model, 176 ManagePasswordsBubbleModel* model,
176 views::StyledLabelListener* listener) { 177 views::StyledLabelListener* listener) {
177 if (model->title_brand_link_range().is_empty()) 178 if (model->title_brand_link_range().is_empty())
178 return; 179 return;
179 180
180 views::StyledLabel* title_label = 181 views::StyledLabel* title_label =
181 new views::StyledLabel(model->title(), listener); 182 new views::StyledLabel(model->title(), listener);
182 title_label->SetBaseFontList( 183 title_label->SetBaseFontList(views::style::GetFont(
183 ui::ResourceBundle::GetSharedInstance().GetFontList( 184 views::style::CONTEXT_DIALOG_TITLE, views::style::STYLE_PRIMARY));
184 ui::ResourceBundle::MediumFont));
185 title_label->AddStyleRange(model->title_brand_link_range(), GetLinkStyle()); 185 title_label->AddStyleRange(model->title_brand_link_range(), GetLinkStyle());
186 layout->StartRow(0, SINGLE_VIEW_COLUMN_SET); 186 layout->StartRow(0, SINGLE_VIEW_COLUMN_SET);
187 layout->AddView(title_label); 187 layout->AddView(title_label);
188 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); 188 layout->AddPaddingRow(0, ChromeLayoutProvider::Get()->GetDistanceMetric(
189 DISTANCE_UNRELATED_CONTROL_VERTICAL));
tapted 2017/05/10 05:30:12 INSETS_BUBBLE_CONTENTS.top()?
Patti Lor 2017/05/11 06:59:18 Done. I also went ahead and changed other places w
189 } 190 }
190 191
191 } // namespace 192 } // namespace
192 193
193 // ManagePasswordsBubbleView::AutoSigninView ---------------------------------- 194 // ManagePasswordsBubbleView::AutoSigninView ----------------------------------
194 195
195 // A view containing just one credential that was used for for automatic signing 196 // A view containing just one credential that was used for for automatic signing
196 // in. 197 // in.
197 class ManagePasswordsBubbleView::AutoSigninView 198 class ManagePasswordsBubbleView::AutoSigninView
198 : public views::View, 199 : public views::View,
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_BUBBLE_BLACKLIST_BUTTON)); 332 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_BUBBLE_BLACKLIST_BUTTON));
332 333
333 // Title row. 334 // Title row.
334 BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET); 335 BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET);
335 AddTitleRowWithLink(layout, parent_->model(), this); 336 AddTitleRowWithLink(layout, parent_->model(), this);
336 337
337 // Credential row. 338 // Credential row.
338 if (item) { 339 if (item) {
339 layout->StartRow(0, SINGLE_VIEW_COLUMN_SET); 340 layout->StartRow(0, SINGLE_VIEW_COLUMN_SET);
340 layout->AddView(item); 341 layout->AddView(item);
341 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); 342 layout->AddPaddingRow(0, ChromeLayoutProvider::Get()->GetDistanceMetric(
343 DISTANCE_UNRELATED_CONTROL_VERTICAL));
tapted 2017/05/10 05:30:12 INSETS_BUBBLE_CONTENTS.bottom()?
Patti Lor 2017/05/11 06:59:19 Done, + button insets top below.
342 } 344 }
343 345
344 // Button row. 346 // Button row.
345 BuildColumnSet(layout, DOUBLE_BUTTON_COLUMN_SET); 347 BuildColumnSet(layout, DOUBLE_BUTTON_COLUMN_SET);
346 layout->StartRow(0, DOUBLE_BUTTON_COLUMN_SET); 348 layout->StartRow(0, DOUBLE_BUTTON_COLUMN_SET);
347 layout->AddView(save_button_); 349 layout->AddView(save_button_);
348 layout->AddView(never_button_); 350 layout->AddView(never_button_);
349 351
350 parent_->set_initially_focused_view(save_button_); 352 parent_->set_initially_focused_view(save_button_);
351 } 353 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 views::Link* manage_link_; 405 views::Link* manage_link_;
404 views::Button* done_button_; 406 views::Button* done_button_;
405 407
406 DISALLOW_COPY_AND_ASSIGN(ManageView); 408 DISALLOW_COPY_AND_ASSIGN(ManageView);
407 }; 409 };
408 410
409 ManagePasswordsBubbleView::ManageView::ManageView( 411 ManagePasswordsBubbleView::ManageView::ManageView(
410 ManagePasswordsBubbleView* parent) 412 ManagePasswordsBubbleView* parent)
411 : parent_(parent) { 413 : parent_(parent) {
412 views::GridLayout* layout = new views::GridLayout(this); 414 views::GridLayout* layout = new views::GridLayout(this);
415 const int vertical_padding = ChromeLayoutProvider::Get()->GetDistanceMetric(
416 DISTANCE_UNRELATED_CONTROL_VERTICAL);
413 layout->set_minimum_size(gfx::Size(kDesiredBubbleWidth, 0)); 417 layout->set_minimum_size(gfx::Size(kDesiredBubbleWidth, 0));
414 SetLayoutManager(layout); 418 SetLayoutManager(layout);
419 BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET);
420 layout->StartRowWithPadding(0, SINGLE_VIEW_COLUMN_SET, 0, vertical_padding);
tapted 2017/05/10 05:30:12 INSETS_BUBBLE_CONTENTS.top()?
Patti Lor 2017/05/11 06:59:19 Deleted this, because this is also always beneath
415 421
416 // If we have a list of passwords to store for the current site, display 422 // If we have a list of passwords to store for the current site, display
417 // them to the user for management. Otherwise, render a "No passwords for 423 // them to the user for management. Otherwise, render a "No passwords for
418 // this site" message. 424 // this site" message.
419 BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET);
420 if (!parent_->model()->local_credentials().empty()) { 425 if (!parent_->model()->local_credentials().empty()) {
421 ManagePasswordItemsView* item = new ManagePasswordItemsView( 426 ManagePasswordItemsView* item = new ManagePasswordItemsView(
422 parent_->model(), &parent_->model()->local_credentials()); 427 parent_->model(), &parent_->model()->local_credentials());
423 layout->StartRowWithPadding(0, SINGLE_VIEW_COLUMN_SET, 0,
424 views::kUnrelatedControlVerticalSpacing);
425 layout->AddView(item); 428 layout->AddView(item);
426 } else { 429 } else {
427 views::Label* empty_label = new views::Label( 430 views::Label* empty_label = new views::Label(
428 l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_NO_PASSWORDS)); 431 l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_NO_PASSWORDS));
tapted 2017/05/10 05:30:12 DEPRECATED_SMALL
Patti Lor 2017/05/11 06:59:19 Done.
429 empty_label->SetMultiLine(true); 432 empty_label->SetMultiLine(true);
430 empty_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 433 empty_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
431 empty_label->SetFontList( 434 empty_label->SetFontList(views::style::GetFont(
432 ui::ResourceBundle::GetSharedInstance().GetFontList( 435 views::style::CONTEXT_LABEL, views::style::STYLE_PRIMARY));
433 ui::ResourceBundle::SmallFont));
434
435 layout->StartRowWithPadding(0, SINGLE_VIEW_COLUMN_SET, 0,
436 views::kUnrelatedControlVerticalSpacing);
437 layout->AddView(empty_label); 436 layout->AddView(empty_label);
438 } 437 }
439 438
440 // Then add the "manage passwords" link and "Done" button. 439 // Then add the "manage passwords" link and "Done" button.
441 manage_link_ = new views::Link(parent_->model()->manage_link()); 440 manage_link_ = new views::Link(parent_->model()->manage_link());
442 manage_link_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 441 manage_link_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
443 manage_link_->SetUnderline(false); 442 manage_link_->SetUnderline(false);
444 manage_link_->set_listener(this); 443 manage_link_->set_listener(this);
445 444
446 done_button_ = views::MdTextButton::CreateSecondaryUiButton( 445 done_button_ = views::MdTextButton::CreateSecondaryUiButton(
447 this, l10n_util::GetStringUTF16(IDS_DONE)); 446 this, l10n_util::GetStringUTF16(IDS_DONE));
448 447
449 BuildColumnSet(layout, LINK_BUTTON_COLUMN_SET); 448 BuildColumnSet(layout, LINK_BUTTON_COLUMN_SET);
450 layout->StartRowWithPadding(0, LINK_BUTTON_COLUMN_SET, 0, 449 layout->StartRowWithPadding(0, LINK_BUTTON_COLUMN_SET, 0, vertical_padding);
tapted 2017/05/10 05:30:12 INSETS_BUBBLE_CONTENTS.bottom()?
Patti Lor 2017/05/11 06:59:19 Done, + button insets top
451 views::kUnrelatedControlVerticalSpacing);
452 layout->AddView(manage_link_); 450 layout->AddView(manage_link_);
453 layout->AddView(done_button_); 451 layout->AddView(done_button_);
454 452
455 parent_->set_initially_focused_view(done_button_); 453 parent_->set_initially_focused_view(done_button_);
456 } 454 }
457 455
458 ManagePasswordsBubbleView::ManageView::~ManageView() { 456 ManagePasswordsBubbleView::ManageView::~ManageView() {
459 } 457 }
460 458
461 void ManagePasswordsBubbleView::ManageView::ButtonPressed( 459 void ManagePasswordsBubbleView::ManageView::ButtonPressed(
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 500
503 ManagePasswordsBubbleView::SaveConfirmationView::SaveConfirmationView( 501 ManagePasswordsBubbleView::SaveConfirmationView::SaveConfirmationView(
504 ManagePasswordsBubbleView* parent) 502 ManagePasswordsBubbleView* parent)
505 : parent_(parent) { 503 : parent_(parent) {
506 views::GridLayout* layout = new views::GridLayout(this); 504 views::GridLayout* layout = new views::GridLayout(this);
507 layout->set_minimum_size(gfx::Size(kDesiredBubbleWidth, 0)); 505 layout->set_minimum_size(gfx::Size(kDesiredBubbleWidth, 0));
508 SetLayoutManager(layout); 506 SetLayoutManager(layout);
509 507
510 views::StyledLabel* confirmation = 508 views::StyledLabel* confirmation =
511 new views::StyledLabel(parent_->model()->save_confirmation_text(), this); 509 new views::StyledLabel(parent_->model()->save_confirmation_text(), this);
512 confirmation->SetBaseFontList( 510 confirmation->SetBaseFontList(views::style::GetFont(
513 ui::ResourceBundle::GetSharedInstance().GetFontList( 511 views::style::CONTEXT_LABEL, views::style::STYLE_PRIMARY));
tapted 2017/05/10 05:30:12 DEPRECATED_SMALL
Patti Lor 2017/05/11 06:59:19 Done.
514 ui::ResourceBundle::SmallFont));
515 confirmation->AddStyleRange( 512 confirmation->AddStyleRange(
516 parent_->model()->save_confirmation_link_range(), GetLinkStyle()); 513 parent_->model()->save_confirmation_link_range(), GetLinkStyle());
517 514
518 BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET); 515 BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET);
519 layout->StartRow(0, SINGLE_VIEW_COLUMN_SET); 516 layout->StartRow(0, SINGLE_VIEW_COLUMN_SET);
520 layout->AddView(confirmation); 517 layout->AddView(confirmation);
521 518
522 ok_button_ = views::MdTextButton::CreateSecondaryUiButton( 519 ok_button_ = views::MdTextButton::CreateSecondaryUiButton(
523 this, l10n_util::GetStringUTF16(IDS_OK)); 520 this, l10n_util::GetStringUTF16(IDS_OK));
524 521
525 BuildColumnSet(layout, SINGLE_BUTTON_COLUMN_SET); 522 BuildColumnSet(layout, SINGLE_BUTTON_COLUMN_SET);
526 layout->StartRowWithPadding( 523 layout->StartRowWithPadding(0, SINGLE_BUTTON_COLUMN_SET, 0,
527 0, SINGLE_BUTTON_COLUMN_SET, 0, views::kRelatedControlVerticalSpacing); 524 ChromeLayoutProvider::Get()->GetDistanceMetric(
525 views::DISTANCE_RELATED_CONTROL_VERTICAL));
Patti Lor 2017/05/11 06:59:18 Changed this to bubble contents bottom + button ro
528 layout->AddView(ok_button_); 526 layout->AddView(ok_button_);
529 527
530 parent_->set_initially_focused_view(ok_button_); 528 parent_->set_initially_focused_view(ok_button_);
531 } 529 }
532 530
533 ManagePasswordsBubbleView::SaveConfirmationView::~SaveConfirmationView() { 531 ManagePasswordsBubbleView::SaveConfirmationView::~SaveConfirmationView() {
534 } 532 }
535 533
536 void ManagePasswordsBubbleView::SaveConfirmationView::StyledLabelLinkClicked( 534 void ManagePasswordsBubbleView::SaveConfirmationView::StyledLabelLinkClicked(
537 views::StyledLabel* label, 535 views::StyledLabel* label,
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET); 665 BuildColumnSet(layout, SINGLE_VIEW_COLUMN_SET);
668 AddTitleRowWithLink(layout, parent_->model(), this); 666 AddTitleRowWithLink(layout, parent_->model(), this);
669 667
670 // Credential row. 668 // Credential row.
671 layout->StartRow(0, SINGLE_VIEW_COLUMN_SET); 669 layout->StartRow(0, SINGLE_VIEW_COLUMN_SET);
672 layout->AddView(item); 670 layout->AddView(item);
673 671
674 // Button row. 672 // Button row.
675 BuildColumnSet(layout, DOUBLE_BUTTON_COLUMN_SET); 673 BuildColumnSet(layout, DOUBLE_BUTTON_COLUMN_SET);
676 layout->StartRowWithPadding(0, DOUBLE_BUTTON_COLUMN_SET, 0, 674 layout->StartRowWithPadding(0, DOUBLE_BUTTON_COLUMN_SET, 0,
677 views::kUnrelatedControlVerticalSpacing); 675 ChromeLayoutProvider::Get()->GetDistanceMetric(
676 DISTANCE_UNRELATED_CONTROL_VERTICAL));
tapted 2017/05/10 05:30:12 INSETS_BUBBLE_CONTENTS.bottom()?
Patti Lor 2017/05/11 06:59:19 Done + button row top.
678 layout->AddView(update_button_); 677 layout->AddView(update_button_);
679 layout->AddView(nope_button_); 678 layout->AddView(nope_button_);
680 679
681 parent_->set_initially_focused_view(update_button_); 680 parent_->set_initially_focused_view(update_button_);
682 } 681 }
683 682
684 ManagePasswordsBubbleView::UpdatePendingView::~UpdatePendingView() {} 683 ManagePasswordsBubbleView::UpdatePendingView::~UpdatePendingView() {}
685 684
686 void ManagePasswordsBubbleView::UpdatePendingView::ButtonPressed( 685 void ManagePasswordsBubbleView::UpdatePendingView::ButtonPressed(
687 views::Button* sender, 686 views::Button* sender,
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 } else if (model_.state() == 879 } else if (model_.state() ==
881 password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE) { 880 password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE) {
882 AddChildView(new DesktopIOSPromotionBubbleView( 881 AddChildView(new DesktopIOSPromotionBubbleView(
883 model_.GetProfile(), 882 model_.GetProfile(),
884 desktop_ios_promotion::PromotionEntryPoint::SAVE_PASSWORD_BUBBLE)); 883 desktop_ios_promotion::PromotionEntryPoint::SAVE_PASSWORD_BUBBLE));
885 #endif 884 #endif
886 } else { 885 } else {
887 AddChildView(new ManageView(this)); 886 AddChildView(new ManageView(this));
888 } 887 }
889 } 888 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698