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

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

Issue 1730893002: Revert of Remove DialogDelegate::OnClosed() which is redundant with (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/account_chooser_dialog_view.h" 5 #include "chrome/browser/ui/views/passwords/account_chooser_dialog_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/passwords/password_dialog_controller.h" 9 #include "chrome/browser/ui/passwords/password_dialog_controller.h"
10 #include "chrome/browser/ui/views/passwords/credentials_item_view.h" 10 #include "chrome/browser/ui/views/passwords/credentials_item_view.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 bool AccountChooserDialogView::ShouldShowWindowTitle() const { 93 bool AccountChooserDialogView::ShouldShowWindowTitle() const {
94 // The title may contain a hyperlink. 94 // The title may contain a hyperlink.
95 return false; 95 return false;
96 } 96 }
97 97
98 bool AccountChooserDialogView::ShouldShowCloseButton() const { 98 bool AccountChooserDialogView::ShouldShowCloseButton() const {
99 return false; 99 return false;
100 } 100 }
101 101
102 void AccountChooserDialogView::WindowClosing() {
103 if (controller_)
104 controller_->OnCloseDialog();
105 }
106
107 int AccountChooserDialogView::GetDialogButtons() const { 102 int AccountChooserDialogView::GetDialogButtons() const {
108 return ui::DIALOG_BUTTON_CANCEL; 103 return ui::DIALOG_BUTTON_CANCEL;
109 } 104 }
110 105
111 base::string16 AccountChooserDialogView::GetDialogButtonLabel( 106 base::string16 AccountChooserDialogView::GetDialogButtonLabel(
112 ui::DialogButton button) const { 107 ui::DialogButton button) const {
113 return l10n_util::GetStringUTF16(IDS_APP_CANCEL); 108 return l10n_util::GetStringUTF16(IDS_APP_CANCEL);
114 } 109 }
115 110
111 void AccountChooserDialogView::OnClosed() {
112 if (controller_)
113 controller_->OnCloseDialog();
114 }
115
116 gfx::Size AccountChooserDialogView::GetPreferredSize() const { 116 gfx::Size AccountChooserDialogView::GetPreferredSize() const {
117 return gfx::Size(kDesiredWidth, GetHeightForWidth(kDesiredWidth)); 117 return gfx::Size(kDesiredWidth, GetHeightForWidth(kDesiredWidth));
118 } 118 }
119 119
120 void AccountChooserDialogView::StyledLabelLinkClicked(views::StyledLabel* label, 120 void AccountChooserDialogView::StyledLabelLinkClicked(views::StyledLabel* label,
121 const gfx::Range& range, 121 const gfx::Range& range,
122 int event_flags) { 122 int event_flags) {
123 controller_->OnSmartLockLinkClicked(); 123 controller_->OnSmartLockLinkClicked();
124 } 124 }
125 125
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 179 }
180 // DialogClientView adds kRelatedControlVerticalSpacing padding once more for 180 // DialogClientView adds kRelatedControlVerticalSpacing padding once more for
181 // the buttons. 181 // the buttons.
182 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 182 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
183 } 183 }
184 184
185 AccountChooserPrompt* CreateAccountChooserPromptView( 185 AccountChooserPrompt* CreateAccountChooserPromptView(
186 PasswordDialogController* controller, content::WebContents* web_contents) { 186 PasswordDialogController* controller, content::WebContents* web_contents) {
187 return new AccountChooserDialogView(controller, web_contents); 187 return new AccountChooserDialogView(controller, web_contents);
188 } 188 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698