| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
| 7 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
| 8 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" | 8 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" |
| 9 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 9 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
| 10 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h" | 10 #include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 if (!text.empty()) { | 189 if (!text.empty()) { |
| 190 NSAttributedString* attributedString = | 190 NSAttributedString* attributedString = |
| 191 constrained_window::GetAttributedLabelString( | 191 constrained_window::GetAttributedLabelString( |
| 192 SysUTF16ToNSString(text), kProgressFontStyle, NSCenterTextAlignment, | 192 SysUTF16ToNSString(text), kProgressFontStyle, NSCenterTextAlignment, |
| 193 NSLineBreakByWordWrapping); | 193 NSLineBreakByWordWrapping); |
| 194 [progressOverlayLabel_ setAttributedStringValue:attributedString]; | 194 [progressOverlayLabel_ setAttributedStringValue:attributedString]; |
| 195 } | 195 } |
| 196 | 196 |
| 197 [progressOverlayLabel_ setHidden:text.empty()]; | 197 [progressOverlayLabel_ setHidden:text.empty()]; |
| 198 [inputRowView_ setHidden:!text.empty()]; | 198 [inputRowView_ setHidden:!text.empty()]; |
| 199 [storageView_ setHidden:!text.empty()]; |
| 199 [self updateVerifyButtonEnabled]; | 200 [self updateVerifyButtonEnabled]; |
| 200 } | 201 } |
| 201 | 202 |
| 202 - (void)setInputsEnabled:(BOOL)enabled { | 203 - (void)setInputsEnabled:(BOOL)enabled { |
| 203 [cvcInput_ setEnabled:enabled]; | 204 [cvcInput_ setEnabled:enabled]; |
| 204 [monthPopup_ setEnabled:enabled]; | 205 [monthPopup_ setEnabled:enabled]; |
| 205 [yearPopup_ setEnabled:enabled]; | 206 [yearPopup_ setEnabled:enabled]; |
| 206 [storageCheckbox_ setEnabled:enabled]; | 207 [storageCheckbox_ setEnabled:enabled]; |
| 207 } | 208 } |
| 208 | 209 |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 | 545 |
| 545 // Layout inputRowView_. | 546 // Layout inputRowView_. |
| 546 [CardUnmaskPromptViewCocoa sizeToFitView:inputRowView_]; | 547 [CardUnmaskPromptViewCocoa sizeToFitView:inputRowView_]; |
| 547 [CardUnmaskPromptViewCocoa verticallyCenterSubviewsInView:inputRowView_]; | 548 [CardUnmaskPromptViewCocoa verticallyCenterSubviewsInView:inputRowView_]; |
| 548 | 549 |
| 549 [self setView:mainView]; | 550 [self setView:mainView]; |
| 550 [self performLayoutAndDisplay:NO]; | 551 [self performLayoutAndDisplay:NO]; |
| 551 } | 552 } |
| 552 | 553 |
| 553 @end | 554 @end |
| OLD | NEW |