| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_TEXT_FIELD_MAC_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_TEXT_FIELD_MAC_ |
| 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_TEXT_FIELD_MAC_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_TEXT_FIELD_MAC_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 // Subclass of NSTextField that automatically scrolls containing NSScrollView | 10 #import "base/scoped_nsobject.h" |
| 11 // to visually reveal the text field. When the user tabs between text fields | 11 |
| 12 // embedded in a scrolling view they'd like the "first responder" to be visible. | 12 #define AUTOFILL_CC_TAG 22 |
| 13 // This class helps achieve that. | 13 |
| 14 // Subclass of NSTextField with special abilities: |
| 15 // - automatically scrolls containing NSScrollView to visually reveal itself |
| 16 // on focus |
| 17 // - properly obfuscates credit card numbers |
| 18 |
| 14 @interface AutoFillTextField : NSTextField { | 19 @interface AutoFillTextField : NSTextField { |
| 20 BOOL isCreditCardField_; |
| 21 BOOL isObfuscated_; |
| 22 BOOL isBeingSelected_; |
| 23 |
| 24 scoped_nsobject<NSString> obfuscatedValue_; |
| 15 } | 25 } |
| 16 @end | 26 @end |
| 17 | 27 |
| 18 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_TEXT_FIELD_MAC_ | 28 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_TEXT_FIELD_MAC_ |
| OLD | NEW |