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

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

Issue 108063004: Give up focus if the focused view becomes unfocusable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Extracted to common code into FocusManager class Created 7 years 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 | Annotate | Revision Log
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 return ui::DIALOG_BUTTON_NONE; 109 return ui::DIALOG_BUTTON_NONE;
110 } 110 }
111 111
112 views::View* ProfileSigninConfirmationDialogViews::CreateExtraView() { 112 views::View* ProfileSigninConfirmationDialogViews::CreateExtraView() {
113 if (prompt_for_new_profile_) { 113 if (prompt_for_new_profile_) {
114 const string16 continue_signin_text = 114 const string16 continue_signin_text =
115 l10n_util::GetStringUTF16(IDS_ENTERPRISE_SIGNIN_CONTINUE_NEW_STYLE); 115 l10n_util::GetStringUTF16(IDS_ENTERPRISE_SIGNIN_CONTINUE_NEW_STYLE);
116 continue_signin_button_ = 116 continue_signin_button_ =
117 new views::LabelButton(this, continue_signin_text); 117 new views::LabelButton(this, continue_signin_text);
118 continue_signin_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON); 118 continue_signin_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON);
119 continue_signin_button_->set_focusable(true); 119 continue_signin_button_->SetFocusable(true);
120 } 120 }
121 return continue_signin_button_; 121 return continue_signin_button_;
122 } 122 }
123 123
124 bool ProfileSigninConfirmationDialogViews::Accept() { 124 bool ProfileSigninConfirmationDialogViews::Accept() {
125 if (delegate_) { 125 if (delegate_) {
126 if (prompt_for_new_profile_) 126 if (prompt_for_new_profile_)
127 delegate_->OnSigninWithNewProfile(); 127 delegate_->OnSigninWithNewProfile();
128 else 128 else
129 delegate_->OnContinueSignin(); 129 delegate_->OnContinueSignin();
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 views::Button* sender, 251 views::Button* sender,
252 const ui::Event& event) { 252 const ui::Event& event) {
253 DCHECK(prompt_for_new_profile_); 253 DCHECK(prompt_for_new_profile_);
254 DCHECK_EQ(continue_signin_button_, sender); 254 DCHECK_EQ(continue_signin_button_, sender);
255 if (delegate_) { 255 if (delegate_) {
256 delegate_->OnContinueSignin(); 256 delegate_->OnContinueSignin();
257 delegate_ = NULL; 257 delegate_ = NULL;
258 } 258 }
259 GetWidget()->Close(); 259 GetWidget()->Close();
260 } 260 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698