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

Side by Side Diff: chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc

Issue 2922263002: Fix style of profile error dialog. (Closed)
Patch Set: tapted's and pkasting's comments Created 3 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/autofill/card_unmask_prompt_views.h" 5 #include "chrome/browser/ui/views/autofill/card_unmask_prompt_views.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 } 295 }
296 296
297 base::string16 CardUnmaskPromptViews::GetDialogButtonLabel( 297 base::string16 CardUnmaskPromptViews::GetDialogButtonLabel(
298 ui::DialogButton button) const { 298 ui::DialogButton button) const {
299 if (button == ui::DIALOG_BUTTON_OK) 299 if (button == ui::DIALOG_BUTTON_OK)
300 return controller_->GetOkButtonLabel(); 300 return controller_->GetOkButtonLabel();
301 301
302 return DialogDelegateView::GetDialogButtonLabel(button); 302 return DialogDelegateView::GetDialogButtonLabel(button);
303 } 303 }
304 304
305 bool CardUnmaskPromptViews::ShouldDefaultButtonBeBlue() const {
306 return true;
307 }
308
309 bool CardUnmaskPromptViews::IsDialogButtonEnabled( 305 bool CardUnmaskPromptViews::IsDialogButtonEnabled(
310 ui::DialogButton button) const { 306 ui::DialogButton button) const {
311 if (button == ui::DIALOG_BUTTON_CANCEL) 307 if (button == ui::DIALOG_BUTTON_CANCEL)
312 return true; 308 return true;
313 309
314 DCHECK_EQ(ui::DIALOG_BUTTON_OK, button); 310 DCHECK_EQ(ui::DIALOG_BUTTON_OK, button);
315 311
316 return cvc_input_->enabled() && 312 return cvc_input_->enabled() &&
317 controller_->InputCvcIsValid(cvc_input_->text()) && 313 controller_->InputCvcIsValid(cvc_input_->text()) &&
318 ExpirationDateIsValid(); 314 ExpirationDateIsValid();
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 views::View::OnPaint(canvas); 519 views::View::OnPaint(canvas);
524 canvas->Restore(); 520 canvas->Restore();
525 } 521 }
526 522
527 void CardUnmaskPromptViews::FadeOutView::SetAlpha(uint8_t alpha) { 523 void CardUnmaskPromptViews::FadeOutView::SetAlpha(uint8_t alpha) {
528 alpha_ = alpha; 524 alpha_ = alpha;
529 SchedulePaint(); 525 SchedulePaint();
530 } 526 }
531 527
532 } // namespace autofill 528 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/autofill/card_unmask_prompt_views.h ('k') | chrome/browser/ui/views/autofill/save_card_bubble_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698