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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 #include "content/public/browser/navigation_entry.h" | 67 #include "content/public/browser/navigation_entry.h" |
68 #include "content/public/browser/notification_service.h" | 68 #include "content/public/browser/notification_service.h" |
69 #include "content/public/browser/notification_types.h" | 69 #include "content/public/browser/notification_types.h" |
70 #include "content/public/browser/render_view_host.h" | 70 #include "content/public/browser/render_view_host.h" |
71 #include "content/public/browser/web_contents.h" | 71 #include "content/public/browser/web_contents.h" |
72 #include "content/public/browser/web_contents_view.h" | 72 #include "content/public/browser/web_contents_view.h" |
73 #include "content/public/common/url_constants.h" | 73 #include "content/public/common/url_constants.h" |
74 #include "grit/chromium_strings.h" | 74 #include "grit/chromium_strings.h" |
75 #include "grit/component_strings.h" | 75 #include "grit/component_strings.h" |
76 #include "grit/generated_resources.h" | 76 #include "grit/generated_resources.h" |
| 77 #include "grit/platform_locale_settings.h" |
77 #include "grit/theme_resources.h" | 78 #include "grit/theme_resources.h" |
78 #include "grit/webkit_resources.h" | 79 #include "grit/webkit_resources.h" |
79 #include "net/cert/cert_status_flags.h" | 80 #include "net/cert/cert_status_flags.h" |
80 #include "ui/base/base_window.h" | 81 #include "ui/base/base_window.h" |
81 #include "ui/base/events/event.h" | 82 #include "ui/base/events/event.h" |
82 #include "ui/base/l10n/l10n_util.h" | 83 #include "ui/base/l10n/l10n_util.h" |
83 #include "ui/base/models/combobox_model.h" | 84 #include "ui/base/models/combobox_model.h" |
84 #include "ui/base/resource/resource_bundle.h" | 85 #include "ui/base/resource/resource_bundle.h" |
85 #include "ui/gfx/canvas.h" | 86 #include "ui/gfx/canvas.h" |
86 #include "ui/gfx/image/image_skia_operations.h" | 87 #include "ui/gfx/image/image_skia_operations.h" |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 | 473 |
473 gfx::Rect display_rect(size); | 474 gfx::Rect display_rect(size); |
474 | 475 |
475 skia::RefPtr<SkShader> shader = gfx::CreateGradientShader( | 476 skia::RefPtr<SkShader> shader = gfx::CreateGradientShader( |
476 0, size.height(), gradient_top, gradient_bottom); | 477 0, size.height(), gradient_top, gradient_bottom); |
477 SkPaint paint; | 478 SkPaint paint; |
478 paint.setShader(shader.get()); | 479 paint.setShader(shader.get()); |
479 canvas.DrawRoundRect(display_rect, 8, paint); | 480 canvas.DrawRoundRect(display_rect, 8, paint); |
480 | 481 |
481 display_rect.Inset(20, 0, 0, 0); | 482 display_rect.Inset(20, 0, 0, 0); |
482 gfx::Font monospace("monospace", 18); | 483 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 484 gfx::Font monospace( |
| 485 UTF16ToUTF8(rb.GetLocalizedString(IDS_FIXED_FONT_FAMILY)), 18); |
483 gfx::ShadowValues shadows; | 486 gfx::ShadowValues shadows; |
484 shadows.push_back(gfx::ShadowValue(gfx::Point(0, 1), 1.0, SK_ColorBLACK)); | 487 shadows.push_back(gfx::ShadowValue(gfx::Point(0, 1), 1.0, SK_ColorBLACK)); |
485 // TODO(estade): use DrawStringRectWithShadows(). | 488 // TODO(estade): use DrawStringRectWithShadows(). |
486 canvas.DrawStringWithShadows( | 489 canvas.DrawStringWithShadows( |
487 card_number, | 490 card_number, |
488 monospace, | 491 monospace, |
489 SK_ColorWHITE, | 492 SK_ColorWHITE, |
490 display_rect, 0, 0, shadows); | 493 display_rect, 0, 0, shadows); |
491 | 494 |
492 base::string16 capitalized_name = base::i18n::ToUpper(name); | 495 base::string16 capitalized_name = base::i18n::ToUpper(name); |
(...skipping 2867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3360 } | 3363 } |
3361 | 3364 |
3362 void AutofillDialogControllerImpl::OnSubmitButtonDelayEnd() { | 3365 void AutofillDialogControllerImpl::OnSubmitButtonDelayEnd() { |
3363 if (!view_) | 3366 if (!view_) |
3364 return; | 3367 return; |
3365 ScopedViewUpdates updates(view_.get()); | 3368 ScopedViewUpdates updates(view_.get()); |
3366 view_->UpdateButtonStrip(); | 3369 view_->UpdateButtonStrip(); |
3367 } | 3370 } |
3368 | 3371 |
3369 } // namespace autofill | 3372 } // namespace autofill |
OLD | NEW |