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_SECTION_VIEW_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SECTION_VIEW_H_
8 #import <Cocoa/Cocoa.h>
10 #import "ui/base/cocoa/base_view.h"
12 // Main view for autofill sections. Takes care of hover highlight if needed.
13 // Tracking areas are subtle and quick to anger. BaseView does the right thing.
14 @interface AutofillSectionView
: BaseView
{
16 NSControl
* clickTarget_
; // Target for mouse clicks, weak.
17 BOOL isHighlighted_
; // Track current highlight state.
18 BOOL shouldHighlightOnHover_
; // Indicates if view should highlight on hover
21 // Target for any mouse click.
22 @
property(assign
, nonatomic
) NSControl
* clickTarget
;
24 // Color used to highlight the view on hover.
25 @
property(readonly
, nonatomic
, getter
=hoverColor
) NSColor
* hoverColor
;
27 // Controls if the view should show a highlight when hovered over.
28 @
property(assign
, nonatomic
) BOOL shouldHighlightOnHover
;
30 // Current highlighting state.
31 @
property(readonly
, nonatomic
) BOOL isHighlighted
;
35 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SECTION_VIEW_H_