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

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

Issue 2774303002: Set TextInputType of CVC prompt to TEXT_INPUT_TYPE_NUMBER. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | 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 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 if (!controller_->ShouldRequestExpirationDate()) { 434 if (!controller_->ShouldRequestExpirationDate()) {
435 for (int i = 0; i < input_row_->child_count(); ++i) 435 for (int i = 0; i < input_row_->child_count(); ++i)
436 input_row_->child_at(i)->SetVisible(false); 436 input_row_->child_at(i)->SetVisible(false);
437 } 437 }
438 438
439 cvc_input_ = new views::Textfield(); 439 cvc_input_ = new views::Textfield();
440 cvc_input_->set_placeholder_text( 440 cvc_input_->set_placeholder_text(
441 l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_PLACEHOLDER_CVC)); 441 l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_PLACEHOLDER_CVC));
442 cvc_input_->set_controller(this); 442 cvc_input_->set_controller(this);
443 cvc_input_->set_default_width_in_chars(8); 443 cvc_input_->set_default_width_in_chars(8);
444 cvc_input_->SetTextInputType(ui::TextInputType::TEXT_INPUT_TYPE_NUMBER);
444 input_row_->AddChildView(cvc_input_); 445 input_row_->AddChildView(cvc_input_);
445 446
446 views::ImageView* cvc_image = new views::ImageView(); 447 views::ImageView* cvc_image = new views::ImageView();
447 cvc_image->SetImage(rb.GetImageSkiaNamed(controller_->GetCvcImageRid())); 448 cvc_image->SetImage(rb.GetImageSkiaNamed(controller_->GetCvcImageRid()));
448 input_row_->AddChildView(cvc_image); 449 input_row_->AddChildView(cvc_image);
449 450
450 views::View* temporary_error = new views::View(); 451 views::View* temporary_error = new views::View();
451 views::BoxLayout* temporary_error_layout = 452 views::BoxLayout* temporary_error_layout =
452 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 4); 453 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 4);
453 temporary_error->SetLayoutManager(temporary_error_layout); 454 temporary_error->SetLayoutManager(temporary_error_layout);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 views::View::OnPaint(canvas); 526 views::View::OnPaint(canvas);
526 canvas->Restore(); 527 canvas->Restore();
527 } 528 }
528 529
529 void CardUnmaskPromptViews::FadeOutView::SetAlpha(uint8_t alpha) { 530 void CardUnmaskPromptViews::FadeOutView::SetAlpha(uint8_t alpha) {
530 alpha_ = alpha; 531 alpha_ = alpha;
531 SchedulePaint(); 532 SchedulePaint();
532 } 533 }
533 534
534 } // namespace autofill 535 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698