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_PASSWORDS_PENDING_PASSWORD_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_PASSWORDS_PENDING_PASSWORD_VIEW_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_PASSWORDS_PENDING_PASSWORD_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_PASSWORDS_PENDING_PASSWORD_VIEW_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
11 #import "chrome/browser/ui/cocoa/passwords/base_passwords_content_view_controlle
r.h" | 11 #import "chrome/browser/ui/cocoa/passwords/base_passwords_content_view_controlle
r.h" |
12 | 12 |
13 class ManagePasswordsBubbleModel; | |
14 @class PasswordsListViewController; | 13 @class PasswordsListViewController; |
15 | 14 |
16 // Base class for the views that offer to save/update the user's password. | 15 // Base class for the views that offer to save/update the user's password. |
17 @interface PendingPasswordViewController | 16 @interface PendingPasswordViewController |
18 : ManagePasswordsBubbleContentViewController<NSTextViewDelegate> { | 17 : ManagePasswordsBubbleContentViewController<NSTextViewDelegate> { |
19 @private | 18 @private |
20 ManagePasswordsBubbleModel* model_; // weak | |
21 base::scoped_nsobject<NSButton> closeButton_; | 19 base::scoped_nsobject<NSButton> closeButton_; |
22 } | 20 } |
23 - (id)initWithModel:(ManagePasswordsBubbleModel*)model | |
24 delegate:(id<ManagePasswordsBubbleContentViewDelegate>)delegate; | |
25 | 21 |
26 // Creates a controller for showing username/password and returns its view. | 22 // Creates a controller for showing username/password and returns its view. |
27 - (NSView*)createPasswordView; | 23 - (NSView*)createPasswordView; |
28 | 24 |
29 // Returns whether GoogleSmartLock warm welcome should be shown. | 25 // Returns whether GoogleSmartLock warm welcome should be shown. |
30 - (BOOL)shouldShowGoogleSmartLockWelcome; | 26 - (BOOL)shouldShowGoogleSmartLockWelcome; |
31 | 27 |
32 // Creates buttons that should be shown in the bubble and returns them. | 28 // Creates buttons that should be shown in the bubble and returns them. |
33 - (NSArray*)createButtonsAndAddThemToView:(NSView*)view; | 29 - (NSArray*)createButtonsAndAddThemToView:(NSView*)view; |
34 | 30 |
35 @property(readonly) ManagePasswordsBubbleModel* model; | 31 @property(readonly) ManagePasswordsBubbleModel* model; |
36 @end | 32 @end |
37 | 33 |
38 @interface PendingPasswordViewController (Testing) | 34 @interface PendingPasswordViewController (Testing) |
39 @property(readonly) NSButton* closeButton; | 35 @property(readonly) NSButton* closeButton; |
40 @end | 36 @end |
41 | 37 |
42 #endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_PENDING_PASSWORD_VIEW_CONTROLLER_H_ | 38 #endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_PENDING_PASSWORD_VIEW_CONTROLLER_H_ |
OLD | NEW |