Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / cocoa / passwords / manage_passwords_bubble_pending_view_controller.h
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_PENDING_VIEW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_PENDING_VIEW_CONTROLLER_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #include "base/mac/scoped_nsobject.h"
11 #import "chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_content_view_controller.h"
12
13 namespace ui {
14 class ComboboxModel;
15 }  // namespace ui
16
17 @class BubbleCombobox;
18 class ManagePasswordsBubbleModel;
19 @class ManagePasswordItemViewController;
20
21 // Handles user interaction with the password save bubble.
22 @protocol ManagePasswordsBubblePendingViewDelegate<
23     ManagePasswordsBubbleContentViewDelegate>
24
25 // The user chose to never save the password on a site that has other passwords
26 // already saved.
27 - (void)passwordShouldNeverBeSavedOnSiteWithExistingPasswords;
28
29 @end
30
31 // Manages the view that offers to save the user's password.
32 @interface ManagePasswordsBubblePendingViewController
33     : ManagePasswordsBubbleContentViewController {
34  @private
35   ManagePasswordsBubbleModel* model_;  // weak
36   id<ManagePasswordsBubblePendingViewDelegate> delegate_;  // weak
37   base::scoped_nsobject<NSButton> saveButton_;
38   base::scoped_nsobject<BubbleCombobox> nopeButton_;
39   base::scoped_nsobject<ManagePasswordItemViewController> passwordItem_;
40 }
41 - (id)initWithModel:(ManagePasswordsBubbleModel*)model
42            delegate:(id<ManagePasswordsBubblePendingViewDelegate>)delegate;
43 @end
44
45 @interface ManagePasswordsBubblePendingViewController (Testing)
46 @property(readonly) NSButton* saveButton;
47 @property(readonly) BubbleCombobox* nopeButton;
48 @end
49
50 #endif  // CHROME_BROWSER_UI_COCOA_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_PENDING_VIEW_CONTROLLER_H_