summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/passwords/account_chooser_view_controller.h
blob: d5328a3463112d18eb4342ac1fc9fac0d949c18f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_COCOA_PASSWORDS_ACCOUNT_CHOOSER_VIEW_CONTROLLER_H_
#define CHROME_BROWSER_UI_COCOA_PASSWORDS_ACCOUNT_CHOOSER_VIEW_CONTROLLER_H_

#import <Cocoa/Cocoa.h>

#import "chrome/browser/ui/cocoa/passwords/password_prompt_bridge_interface.h"

@class AccountAvatarFetcherManager;
class PasswordPromptBridgeInterface;

// Manages a view that shows a list of credentials that can be used for
// authentication to a site.
@interface AccountChooserViewController
    : NSViewController<PasswordPromptViewInterface, NSTextViewDelegate>
@property(nonatomic) PasswordPromptBridgeInterface* bridge;
// Initializes a new account chooser and populates it with the credentials
// stored in |bridge->controller()|.
- (instancetype)initWithBridge:(PasswordPromptBridgeInterface*)bridge;
@end

@interface AccountChooserViewController(Testing)
- (instancetype)initWithBridge:(PasswordPromptBridgeInterface*)bridge
                 avatarManager:(AccountAvatarFetcherManager*)avatarManager;
@property(nonatomic, readonly) NSButton* cancelButton;
@property(nonatomic, readonly) NSArray* credentialButtons;
@property(nonatomic, readonly) NSTextView* titleView;
@end

#endif  // CHROME_BROWSER_UI_COCOA_PASSWORDS_ACCOUNT_CHOOSER_VIEW_CONTROLLER_H_