Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / passwords / manage_credential_item_view_controller.h
blobaca8748d8ecebbf56456844d4e5f2fb75f670e79
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_PASSWORDS_MANAGE_CREDENTIAL_ITEM_VIEW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_PASSWORDS_MANAGE_CREDENTIAL_ITEM_VIEW_CONTROLLER_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/scoped_nsobject.h"
11 #include "components/autofill/core/common/password_form.h"
13 @protocol CredentialItemDelegate;
14 @class CredentialItemView;
15 @class HoverImageButton;
16 class ManagePasswordsBubbleModel;
18 @interface ManageCredentialItemView : NSView {
19 base::scoped_nsobject<CredentialItemView> credentialItem_;
20 base::scoped_nsobject<HoverImageButton> deleteButton_;
22 - (id)initWithPasswordForm:(const autofill::PasswordForm&)passwordForm
23 delegate:(id<CredentialItemDelegate>)delegate
24 target:(id)target
25 action:(SEL)action;
26 @end
28 @interface DeletedCredentialItemView : NSView {
29 base::scoped_nsobject<NSButton> undoButton_;
31 - (id)initWithTarget:(id)target action:(SEL)action;
32 @end
34 @interface ManageCredentialItemViewController : NSViewController {
35 base::scoped_nsobject<NSView> contentView_;
36 autofill::PasswordForm passwordForm_;
37 ManagePasswordsBubbleModel* model_;
38 id<CredentialItemDelegate> delegate_; // Weak.
40 - (id)initWithPasswordForm:(const autofill::PasswordForm&)passwordForm
41 model:(ManagePasswordsBubbleModel*)model
42 delegate:(id<CredentialItemDelegate>)delegate;
43 @end
45 @interface ManageCredentialItemViewController (Testing)
46 @property(nonatomic, readonly) const autofill::PasswordForm& passwordForm;
47 @property(nonatomic, readonly) NSView* contentView;
48 @end
50 #endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_MANAGE_CREDENTIAL_ITEM_VIEW_CONTROLLER_H_