Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / autofill / autofill_notification_controller.h
blobbd185ec0b3b6488b5b0cca962b560e98fe62e415
1 // Copyright 2013 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_AUTOFILL_AUTOFILL_NOTIFICATION_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_NOTIFICATION_CONTROLLER_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/scoped_nsobject.h"
11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
12 #import "chrome/browser/ui/cocoa/autofill/autofill_layout.h"
13 #include "url/gurl.h"
15 @class AutofillTooltipController;
16 @class HyperlinkTextView;
18 namespace autofill {
19 class AutofillDialogViewDelegate;
22 // Contains a single notification for requestAutocomplete dialog.
23 @interface AutofillNotificationController :
24 NSViewController<AutofillLayout, NSTextViewDelegate> {
25 @private
26 // Text view for label.
27 base::scoped_nsobject<HyperlinkTextView> textview_;
29 // Optional tooltip icon.
30 base::scoped_nsobject<AutofillTooltipController> tooltipController_;
32 // Optional link target.
33 GURL linkURL_;
35 // Notification type.
36 autofill::DialogNotification::Type notificationType_;
38 // Main delegate for the dialog. Weak, owns dialog.
39 autofill::AutofillDialogViewDelegate* delegate_;
42 @property(nonatomic, readonly) NSTextView* textview;
43 @property(nonatomic, readonly) NSView* tooltipView;
45 // Designated initializer. Initializes the controller as specified by
46 // |notification|.
47 - (id)initWithNotification:(const autofill::DialogNotification*)notification
48 delegate:(autofill::AutofillDialogViewDelegate*)delegate;
50 // Compute preferred size for given width.
51 - (NSSize)preferredSizeForWidth:(CGFloat)width;
53 @end
55 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_NOTIFICATION_CONTROLLER_H_