| OLD | NEW |
| 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/autofill/autofill_dialog_controller_impl.h" | 5 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 text))); | 465 text))); |
| 466 } | 466 } |
| 467 | 467 |
| 468 gfx::Image GetGeneratedCardImage(const base::string16& card_number, | 468 gfx::Image GetGeneratedCardImage(const base::string16& card_number, |
| 469 const base::string16& name, | 469 const base::string16& name, |
| 470 const SkColor& gradient_top, | 470 const SkColor& gradient_top, |
| 471 const SkColor& gradient_bottom) { | 471 const SkColor& gradient_bottom) { |
| 472 const int kCardWidthPx = 300; | 472 const int kCardWidthPx = 300; |
| 473 const int kCardHeightPx = 190; | 473 const int kCardHeightPx = 190; |
| 474 const gfx::Size size(kCardWidthPx, kCardHeightPx); | 474 const gfx::Size size(kCardWidthPx, kCardHeightPx); |
| 475 gfx::Canvas canvas(size, ui::SCALE_FACTOR_100P, false); | 475 gfx::Canvas canvas(size, 1.0f, false); |
| 476 | 476 |
| 477 gfx::Rect display_rect(size); | 477 gfx::Rect display_rect(size); |
| 478 | 478 |
| 479 skia::RefPtr<SkShader> shader = gfx::CreateGradientShader( | 479 skia::RefPtr<SkShader> shader = gfx::CreateGradientShader( |
| 480 0, size.height(), gradient_top, gradient_bottom); | 480 0, size.height(), gradient_top, gradient_bottom); |
| 481 SkPaint paint; | 481 SkPaint paint; |
| 482 paint.setShader(shader.get()); | 482 paint.setShader(shader.get()); |
| 483 canvas.DrawRoundRect(display_rect, 8, paint); | 483 canvas.DrawRoundRect(display_rect, 8, paint); |
| 484 | 484 |
| 485 display_rect.Inset(20, 0, 0, 0); | 485 display_rect.Inset(20, 0, 0, 0); |
| (...skipping 2922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3408 } | 3408 } |
| 3409 | 3409 |
| 3410 void AutofillDialogControllerImpl::OnSubmitButtonDelayEnd() { | 3410 void AutofillDialogControllerImpl::OnSubmitButtonDelayEnd() { |
| 3411 if (!view_) | 3411 if (!view_) |
| 3412 return; | 3412 return; |
| 3413 ScopedViewUpdates updates(view_.get()); | 3413 ScopedViewUpdates updates(view_.get()); |
| 3414 view_->UpdateButtonStrip(); | 3414 view_->UpdateButtonStrip(); |
| 3415 } | 3415 } |
| 3416 | 3416 |
| 3417 } // namespace autofill | 3417 } // namespace autofill |
| OLD | NEW |