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

Side by Side Diff: chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc

Issue 1977353002: Views: Remove reduntant Button::ConfigureDefaultFocus calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@other_fk_regression
Patch Set: Created 4 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
« no previous file with comments | « ash/shell/lock_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/sync/profile_signin_confirmation_dialog_views. h" 5 #include "chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views. h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 return ui::DIALOG_BUTTON_NONE; 102 return ui::DIALOG_BUTTON_NONE;
103 } 103 }
104 104
105 views::View* ProfileSigninConfirmationDialogViews::CreateExtraView() { 105 views::View* ProfileSigninConfirmationDialogViews::CreateExtraView() {
106 if (prompt_for_new_profile_) { 106 if (prompt_for_new_profile_) {
107 const base::string16 continue_signin_text = 107 const base::string16 continue_signin_text =
108 l10n_util::GetStringUTF16(IDS_ENTERPRISE_SIGNIN_CONTINUE_NEW_STYLE); 108 l10n_util::GetStringUTF16(IDS_ENTERPRISE_SIGNIN_CONTINUE_NEW_STYLE);
109 continue_signin_button_ = 109 continue_signin_button_ =
110 new views::LabelButton(this, continue_signin_text); 110 new views::LabelButton(this, continue_signin_text);
111 continue_signin_button_->SetStyle(views::Button::STYLE_BUTTON); 111 continue_signin_button_->SetStyle(views::Button::STYLE_BUTTON);
112 views::Button::ConfigureDefaultFocus(continue_signin_button_);
113 continue_signin_button_->set_request_focus_on_press(true);
114 } 112 }
115 return continue_signin_button_; 113 return continue_signin_button_;
116 } 114 }
117 115
118 bool ProfileSigninConfirmationDialogViews::Accept() { 116 bool ProfileSigninConfirmationDialogViews::Accept() {
119 if (delegate_) { 117 if (delegate_) {
120 if (prompt_for_new_profile_) 118 if (prompt_for_new_profile_)
121 delegate_->OnSigninWithNewProfile(); 119 delegate_->OnSigninWithNewProfile();
122 else 120 else
123 delegate_->OnContinueSignin(); 121 delegate_->OnContinueSignin();
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 views::Button* sender, 245 views::Button* sender,
248 const ui::Event& event) { 246 const ui::Event& event) {
249 DCHECK(prompt_for_new_profile_); 247 DCHECK(prompt_for_new_profile_);
250 DCHECK_EQ(continue_signin_button_, sender); 248 DCHECK_EQ(continue_signin_button_, sender);
251 if (delegate_) { 249 if (delegate_) {
252 delegate_->OnContinueSignin(); 250 delegate_->OnContinueSignin();
253 delegate_ = NULL; 251 delegate_ = NULL;
254 } 252 }
255 GetWidget()->Close(); 253 GetWidget()->Close();
256 } 254 }
OLDNEW
« no previous file with comments | « ash/shell/lock_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698