OLD | NEW |
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/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 } | 281 } |
282 | 282 |
283 base::string16 CardUnmaskPromptViews::GetWindowTitle() const { | 283 base::string16 CardUnmaskPromptViews::GetWindowTitle() const { |
284 return controller_->GetWindowTitle(); | 284 return controller_->GetWindowTitle(); |
285 } | 285 } |
286 | 286 |
287 void CardUnmaskPromptViews::DeleteDelegate() { | 287 void CardUnmaskPromptViews::DeleteDelegate() { |
288 delete this; | 288 delete this; |
289 } | 289 } |
290 | 290 |
291 int CardUnmaskPromptViews::GetDialogButtons() const { | |
292 return ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL; | |
293 } | |
294 | |
295 base::string16 CardUnmaskPromptViews::GetDialogButtonLabel( | 291 base::string16 CardUnmaskPromptViews::GetDialogButtonLabel( |
296 ui::DialogButton button) const { | 292 ui::DialogButton button) const { |
297 if (button == ui::DIALOG_BUTTON_OK) | 293 if (button == ui::DIALOG_BUTTON_OK) |
298 return l10n_util::GetStringUTF16(IDS_AUTOFILL_CARD_UNMASK_CONFIRM_BUTTON); | 294 return l10n_util::GetStringUTF16(IDS_AUTOFILL_CARD_UNMASK_CONFIRM_BUTTON); |
299 | 295 |
300 return DialogDelegateView::GetDialogButtonLabel(button); | 296 return DialogDelegateView::GetDialogButtonLabel(button); |
301 } | 297 } |
302 | 298 |
303 bool CardUnmaskPromptViews::ShouldDefaultButtonBeBlue() const { | 299 bool CardUnmaskPromptViews::ShouldDefaultButtonBeBlue() const { |
304 return true; | 300 return true; |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |