Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_UI_COCOA_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_COCOA_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_COCOA_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h" | 10 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h" |
| 11 #import "chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h" | 11 #import "chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h" |
| 12 | 12 |
| 13 namespace autofill { | 13 namespace autofill { |
| 14 class AutofillPopupController; | 14 class AutofillPopupController; |
| 15 } // namespace autofill | 15 } // namespace autofill |
| 16 | 16 |
| 17 @class HyperlinkTextView; | 17 @class HyperlinkTextView; |
| 18 | 18 |
| 19 // Draws the native password generation popup view on Mac. | 19 // Draws the native password generation popup view on Mac. |
| 20 @interface PasswordGenerationPopupViewCocoa | 20 @interface PasswordGenerationPopupViewCocoa |
| 21 : AutofillPopupBaseViewCocoa <NSTextViewDelegate> { | 21 : AutofillPopupBaseViewCocoa <NSTextViewDelegate> { |
| 22 @private | 22 @private |
| 23 // The cross-platform controller for this view. | 23 // The cross-platform controller for this view. |
| 24 __weak autofill::PasswordGenerationPopupController* controller_; | 24 __weak autofill::PasswordGenerationPopupController* controller_; |
| 25 | 25 |
| 26 __weak NSTextField* passwordField_; | 26 __weak NSTextField* passwordField_; |
| 27 __weak NSTextField* passwordSubtextField_; | 27 __weak NSTextField* passwordTitleField_; |
| 28 __weak NSImage* keyIcon_; | |
| 28 __weak HyperlinkTextView* helpTextView_; | 29 __weak HyperlinkTextView* helpTextView_; |
| 29 } | 30 } |
| 30 | 31 |
| 31 // Designated initializer. | 32 // Designated initializer. |
| 32 - (id)initWithController: | 33 - (id)initWithController: |
| 33 (autofill::PasswordGenerationPopupController*)controller | 34 (autofill::PasswordGenerationPopupController*)controller |
| 34 frame:(NSRect)frame; | 35 frame:(NSRect)frame; |
| 35 | 36 |
| 37 - (BOOL)isPointInPasswordBounds:(CGPoint)point; | |
|
Ilya Sherman
2014/08/19 22:32:17
nit: Can the |point| be passed as an NSPoint rathe
Ilya Sherman
2014/08/19 22:32:17
Please add documentation for this method.
dconnelly
2014/08/20 17:07:05
Done.
dconnelly
2014/08/20 17:07:05
Done.
| |
| 38 | |
| 36 // Informs the view that its controller has been (or will imminently be) | 39 // Informs the view that its controller has been (or will imminently be) |
| 37 // destroyed. | 40 // destroyed. |
| 38 - (void)controllerDestroyed; | 41 - (void)controllerDestroyed; |
| 39 | 42 |
| 43 // The preferred size for the popup. | |
| 44 - (NSSize)preferredSize; | |
| 45 | |
| 40 @end | 46 @end |
| 41 | 47 |
| 42 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_COCOA _H_ | 48 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_COCOA _H_ |
| OLD | NEW |