Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / autofill / password_generation_popup_view_cocoa.h
blob321666d9f7fe6547994fd204d4d033f8f0f1e93e
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.
5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_COCOA_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/scoped_nsobject.h"
11 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h"
12 #import "chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h"
13 #import "ui/base/cocoa/tracking_area.h"
15 namespace autofill {
16 class AutofillPopupController;
17 } // namespace autofill
19 @class HyperlinkTextView;
21 // Draws the native password generation popup view on Mac.
22 @interface PasswordGenerationPopupViewCocoa
23 : AutofillPopupBaseViewCocoa <NSTextViewDelegate> {
24 @private
25 // The cross-platform controller for this view.
26 __weak autofill::PasswordGenerationPopupController* controller_;
28 base::scoped_nsobject<NSView> passwordSection_;
29 base::scoped_nsobject<NSTextField> passwordField_;
30 base::scoped_nsobject<NSTextField> passwordTitleField_;
31 base::scoped_nsobject<NSImageView> keyIcon_;
32 base::scoped_nsobject<NSBox> divider_;
33 base::scoped_nsobject<HyperlinkTextView> helpTextView_;
34 ui::ScopedCrTrackingArea helpTextTrackingArea_;
37 // Designated initializer.
38 - (id)initWithController:
39 (autofill::PasswordGenerationPopupController*)controller
40 frame:(NSRect)frame;
42 // Determines whether |point| falls inside the password section of the popup.
43 // |point| needs to be in the popup's coordinate system.
44 - (BOOL)isPointInPasswordBounds:(NSPoint)point;
46 // Informs the view that its controller has been (or will imminently be)
47 // destroyed.
48 - (void)controllerDestroyed;
50 // The preferred size for the popup.
51 - (NSSize)preferredSize;
53 @end
55 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_COCOA_H_