| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 #include "third_party/libaddressinput/chromium/chrome_storage_impl.h" | 79 #include "third_party/libaddressinput/chromium/chrome_storage_impl.h" |
| 80 #include "third_party/libaddressinput/messages.h" | 80 #include "third_party/libaddressinput/messages.h" |
| 81 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_da
ta.h" | 81 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_da
ta.h" |
| 82 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_fi
eld.h" | 82 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_fi
eld.h" |
| 83 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_pr
oblem.h" | 83 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_pr
oblem.h" |
| 84 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/localizati
on.h" | 84 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/localizati
on.h" |
| 85 #include "ui/base/l10n/l10n_util.h" | 85 #include "ui/base/l10n/l10n_util.h" |
| 86 #include "ui/base/models/combobox_model.h" | 86 #include "ui/base/models/combobox_model.h" |
| 87 #include "ui/base/resource/resource_bundle.h" | 87 #include "ui/base/resource/resource_bundle.h" |
| 88 #include "ui/gfx/canvas.h" | 88 #include "ui/gfx/canvas.h" |
| 89 #include "ui/gfx/geometry/vector2d.h" |
| 89 #include "ui/gfx/image/image_skia_operations.h" | 90 #include "ui/gfx/image/image_skia_operations.h" |
| 90 #include "ui/gfx/skia_util.h" | 91 #include "ui/gfx/skia_util.h" |
| 91 | 92 |
| 92 using ::i18n::addressinput::AddressData; | 93 using ::i18n::addressinput::AddressData; |
| 93 using ::i18n::addressinput::AddressField; | 94 using ::i18n::addressinput::AddressField; |
| 94 using ::i18n::addressinput::AddressProblem; | 95 using ::i18n::addressinput::AddressProblem; |
| 95 using ::i18n::addressinput::ADMIN_AREA; | 96 using ::i18n::addressinput::ADMIN_AREA; |
| 96 using ::i18n::addressinput::DEPENDENT_LOCALITY; | 97 using ::i18n::addressinput::DEPENDENT_LOCALITY; |
| 97 using ::i18n::addressinput::FieldProblemMap; | 98 using ::i18n::addressinput::FieldProblemMap; |
| 98 using ::i18n::addressinput::Localization; | 99 using ::i18n::addressinput::Localization; |
| (...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1446 skia::RefPtr<SkShader> shader = gfx::CreateGradientShader( | 1447 skia::RefPtr<SkShader> shader = gfx::CreateGradientShader( |
| 1447 0, size.height(), gradient_top, gradient_bottom); | 1448 0, size.height(), gradient_top, gradient_bottom); |
| 1448 SkPaint paint; | 1449 SkPaint paint; |
| 1449 paint.setShader(shader.get()); | 1450 paint.setShader(shader.get()); |
| 1450 canvas.DrawRoundRect(display_rect, 8, paint); | 1451 canvas.DrawRoundRect(display_rect, 8, paint); |
| 1451 | 1452 |
| 1452 display_rect.Inset(20, 0, 0, 0); | 1453 display_rect.Inset(20, 0, 0, 0); |
| 1453 gfx::Font font(l10n_util::GetStringUTF8(IDS_FIXED_FONT_FAMILY), 18); | 1454 gfx::Font font(l10n_util::GetStringUTF8(IDS_FIXED_FONT_FAMILY), 18); |
| 1454 gfx::FontList font_list(font); | 1455 gfx::FontList font_list(font); |
| 1455 gfx::ShadowValues shadows; | 1456 gfx::ShadowValues shadows; |
| 1456 shadows.push_back(gfx::ShadowValue(gfx::Point(0, 1), 1.0, SK_ColorBLACK)); | 1457 shadows.push_back(gfx::ShadowValue(gfx::Vector2d(0, 1), 1.0, SK_ColorBLACK)); |
| 1457 canvas.DrawStringRectWithShadows( | 1458 canvas.DrawStringRectWithShadows( |
| 1458 card_number, | 1459 card_number, |
| 1459 font_list, | 1460 font_list, |
| 1460 SK_ColorWHITE, | 1461 SK_ColorWHITE, |
| 1461 display_rect, 0, 0, shadows); | 1462 display_rect, 0, 0, shadows); |
| 1462 | 1463 |
| 1463 base::string16 capitalized_name = base::i18n::ToUpper(name); | 1464 base::string16 capitalized_name = base::i18n::ToUpper(name); |
| 1464 display_rect.Inset(0, size.height() / 2, 0, 0); | 1465 display_rect.Inset(0, size.height() / 2, 0, 0); |
| 1465 canvas.DrawStringRectWithShadows( | 1466 canvas.DrawStringRectWithShadows( |
| 1466 capitalized_name, | 1467 capitalized_name, |
| (...skipping 2641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4108 view_->UpdateButtonStrip(); | 4109 view_->UpdateButtonStrip(); |
| 4109 } | 4110 } |
| 4110 | 4111 |
| 4111 void AutofillDialogControllerImpl::FetchWalletCookie() { | 4112 void AutofillDialogControllerImpl::FetchWalletCookie() { |
| 4112 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); | 4113 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); |
| 4113 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); | 4114 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); |
| 4114 signin_helper_->StartWalletCookieValueFetch(); | 4115 signin_helper_->StartWalletCookieValueFetch(); |
| 4115 } | 4116 } |
| 4116 | 4117 |
| 4117 } // namespace autofill | 4118 } // namespace autofill |
| OLD | NEW |