OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_popup_controller_impl.h" | 5 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 int id; | 54 int id; |
55 }; | 55 }; |
56 | 56 |
57 const DataResource kDataResources[] = { | 57 const DataResource kDataResources[] = { |
58 { "americanExpressCC", IDR_AUTOFILL_CC_AMEX }, | 58 { "americanExpressCC", IDR_AUTOFILL_CC_AMEX }, |
59 { "dinersCC", IDR_AUTOFILL_CC_DINERS }, | 59 { "dinersCC", IDR_AUTOFILL_CC_DINERS }, |
60 { "discoverCC", IDR_AUTOFILL_CC_DISCOVER }, | 60 { "discoverCC", IDR_AUTOFILL_CC_DISCOVER }, |
61 { "genericCC", IDR_AUTOFILL_CC_GENERIC }, | 61 { "genericCC", IDR_AUTOFILL_CC_GENERIC }, |
62 { "jcbCC", IDR_AUTOFILL_CC_JCB }, | 62 { "jcbCC", IDR_AUTOFILL_CC_JCB }, |
63 { "masterCardCC", IDR_AUTOFILL_CC_MASTERCARD }, | 63 { "masterCardCC", IDR_AUTOFILL_CC_MASTERCARD }, |
64 { "soloCC", IDR_AUTOFILL_CC_SOLO }, | |
65 { "visaCC", IDR_AUTOFILL_CC_VISA }, | 64 { "visaCC", IDR_AUTOFILL_CC_VISA }, |
66 }; | 65 }; |
67 | 66 |
68 } // namespace | 67 } // namespace |
69 | 68 |
70 // static | 69 // static |
71 WeakPtr<AutofillPopupControllerImpl> AutofillPopupControllerImpl::GetOrCreate( | 70 WeakPtr<AutofillPopupControllerImpl> AutofillPopupControllerImpl::GetOrCreate( |
72 WeakPtr<AutofillPopupControllerImpl> previous, | 71 WeakPtr<AutofillPopupControllerImpl> previous, |
73 WeakPtr<AutofillPopupDelegate> delegate, | 72 WeakPtr<AutofillPopupDelegate> delegate, |
74 gfx::NativeView container_view, | 73 gfx::NativeView container_view, |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 // The popup can appear below the field. | 662 // The popup can appear below the field. |
664 return std::make_pair(bottom_growth_start, popup_required_height); | 663 return std::make_pair(bottom_growth_start, popup_required_height); |
665 } else { | 664 } else { |
666 // The popup must appear above the field. | 665 // The popup must appear above the field. |
667 return std::make_pair(top_growth_end - popup_required_height, | 666 return std::make_pair(top_growth_end - popup_required_height, |
668 popup_required_height); | 667 popup_required_height); |
669 } | 668 } |
670 } | 669 } |
671 | 670 |
672 } // namespace autofill | 671 } // namespace autofill |
OLD | NEW |