| Index: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
|
| diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
|
| index 9b2c7f87fc76046d8baae8be798c458234cb2100..c06b1abc92f3063c9f4f2a7d1dcd0fb890816424 100644
|
| --- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
|
| +++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
|
| @@ -13,6 +13,7 @@
|
| #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
|
| #include "chrome/browser/ui/passwords/password_dialog_prompts.h"
|
| #include "chrome/browser/ui/passwords/passwords_model_delegate.h"
|
| +#include "chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_view.h"
|
| #include "chrome/browser/ui/views/frame/browser_view.h"
|
| #include "chrome/browser/ui/views/passwords/credentials_item_view.h"
|
| #include "chrome/browser/ui/views/passwords/credentials_selection_view.h"
|
| @@ -42,8 +43,6 @@ int ManagePasswordsBubbleView::auto_signin_toast_timeout_ = 3;
|
|
|
| namespace {
|
|
|
| -const int kDesiredBubbleWidth = 370;
|
| -
|
| enum ColumnSetType {
|
| // | | (FILL, FILL) | |
|
| // Used for the bubble's header, the credentials list, and for simple
|
| @@ -76,7 +75,7 @@ enum TextRowType { ROW_SINGLE, ROW_MULTILINE };
|
| // to |layout|.
|
| void BuildColumnSet(views::GridLayout* layout, ColumnSetType type) {
|
| views::ColumnSet* column_set = layout->AddColumnSet(type);
|
| - int full_width = kDesiredBubbleWidth;
|
| + int full_width = ManagePasswordsBubbleView::kDesiredBubbleWidth;
|
| switch (type) {
|
| case SINGLE_VIEW_COLUMN_SET:
|
| column_set->AddColumn(views::GridLayout::FILL,
|
| @@ -335,7 +334,7 @@ void ManagePasswordsBubbleView::PendingView::ButtonPressed(
|
| const ui::Event& event) {
|
| if (sender == save_button_) {
|
| parent_->model()->OnSaveClicked();
|
| - if (parent_->model()->ReplaceToShowSignInPromoIfNeeded()) {
|
| + if (parent_->model()->ReplaceToShowPromotionIfNeeded()) {
|
| parent_->Refresh();
|
| return;
|
| }
|
| @@ -797,7 +796,8 @@ bool ManagePasswordsBubbleView::ShouldShowWindowTitle() const {
|
|
|
| bool ManagePasswordsBubbleView::ShouldShowCloseButton() const {
|
| return model_.state() == password_manager::ui::PENDING_PASSWORD_STATE ||
|
| - model_.state() == password_manager::ui::CHROME_SIGN_IN_PROMO_STATE;
|
| + model_.state() == password_manager::ui::CHROME_SIGN_IN_PROMO_STATE ||
|
| + model_.state() == password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE;
|
| }
|
|
|
| void ManagePasswordsBubbleView::Refresh() {
|
| @@ -824,6 +824,10 @@ void ManagePasswordsBubbleView::CreateChild() {
|
| } else if (model_.state() ==
|
| password_manager::ui::CHROME_SIGN_IN_PROMO_STATE) {
|
| AddChildView(new SignInPromoView(this));
|
| + } else if (model_.state() ==
|
| + password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE) {
|
| + AddChildView(new DesktopIOSPromotionView(
|
| + desktop_ios_promotion::PromotionEntryPoint::SAVE_PASSWORD_BUBBLE));
|
| } else {
|
| AddChildView(new ManageView(this));
|
| }
|
|
|