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

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: nit 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 294 }
295 295
296 base::string16 CardUnmaskPromptViews::GetDialogButtonLabel( 296 base::string16 CardUnmaskPromptViews::GetDialogButtonLabel(
297 ui::DialogButton button) const { 297 ui::DialogButton button) const {
298 if (button == ui::DIALOG_BUTTON_OK) 298 if (button == ui::DIALOG_BUTTON_OK)
299 return controller_->GetOkButtonLabel(); 299 return controller_->GetOkButtonLabel();
300 300
301 return DialogDelegateView::GetDialogButtonLabel(button); 301 return DialogDelegateView::GetDialogButtonLabel(button);
302 } 302 }
303 303
304 bool CardUnmaskPromptViews::ShouldDefaultButtonBeBlue() const {
305 return true;
306 }
307
308 bool CardUnmaskPromptViews::IsDialogButtonEnabled( 304 bool CardUnmaskPromptViews::IsDialogButtonEnabled(
309 ui::DialogButton button) const { 305 ui::DialogButton button) const {
310 if (button == ui::DIALOG_BUTTON_CANCEL) 306 if (button == ui::DIALOG_BUTTON_CANCEL)
311 return true; 307 return true;
312 308
313 DCHECK_EQ(ui::DIALOG_BUTTON_OK, button); 309 DCHECK_EQ(ui::DIALOG_BUTTON_OK, button);
314 310
315 return cvc_input_->enabled() && 311 return cvc_input_->enabled() &&
316 controller_->InputCvcIsValid(cvc_input_->text()) && 312 controller_->InputCvcIsValid(cvc_input_->text()) &&
317 ExpirationDateIsValid(); 313 ExpirationDateIsValid();
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 views::View::OnPaint(canvas); 518 views::View::OnPaint(canvas);
523 canvas->Restore(); 519 canvas->Restore();
524 } 520 }
525 521
526 void CardUnmaskPromptViews::FadeOutView::SetAlpha(uint8_t alpha) { 522 void CardUnmaskPromptViews::FadeOutView::SetAlpha(uint8_t alpha) {
527 alpha_ = alpha; 523 alpha_ = alpha;
528 SchedulePaint(); 524 SchedulePaint();
529 } 525 }
530 526
531 } // namespace autofill 527 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698