1cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 2cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// found in the LICENSE file. 4cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 5cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_COCOA_H_ 6cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_COCOA_H_ 7cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 8cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#import <Cocoa/Cocoa.h> 9cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 10cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#import "ui/base/cocoa/base_view.h" 11cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 12cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)namespace autofill { 13cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)class AutofillPopupViewDelegate; 14cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)} 15cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 16cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)@interface AutofillPopupBaseViewCocoa : BaseView { 17cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) @private 18cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) __weak autofill::AutofillPopupViewDelegate* delegate_; 19cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)} 20cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 21cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)- (NSColor*)backgroundColor; 22cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)- (NSColor*)borderColor; 23cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)- (NSColor*)highlightColor; 24cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)- (NSColor*)nameColor; 25cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)- (NSColor*)separatorColor; 26cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)- (NSColor*)subtextColor; 27cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)- (NSColor*)warningColor; 28cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 29cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)- (id)initWithDelegate:(autofill::AutofillPopupViewDelegate*)delegate 30cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) frame:(NSRect)frame; 31cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 32cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Informs the view that its delegate has been (or will imminently be) 33cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// destroyed. 34cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)- (void)delegateDestroyed; 35cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 36cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Draw the popup's background and border. 37cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)- (void)drawBackgroundAndBorder; 38cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 39cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Draws a thin separator in the popup UI. 40cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)- (void)drawSeparatorWithBounds:(NSRect)bounds; 41cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 42cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Messages from AutofillPopupViewBridge: 43cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)- (void)updateBoundsAndRedrawPopup; 44cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)- (void)showPopup; 45cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)- (void)hidePopup; 46cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)@end 47cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 48cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_COCOA_H_ 49