Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / autofill / autofill_section_view.h
bloba85bb1b9c34e0e23aa27df7f084f8bdf61b27245
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 {
15 @private
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 // Resets tracking info. Useful if e.g. the mouse has changed inside/outside
22 // status during a popup menu's runloop.
23 - (void)updateHoverState;
25 // Target for any mouse click.
26 @property(assign, nonatomic) NSControl* clickTarget;
28 // Color used to highlight the view on hover.
29 @property(readonly, nonatomic, getter=hoverColor) NSColor* hoverColor;
31 // Controls if the view should show a highlight when hovered over.
32 @property(assign, nonatomic) BOOL shouldHighlightOnHover;
34 // Current highlighting state.
35 @property(readonly, nonatomic) BOOL isHighlighted;
37 @end
39 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SECTION_VIEW_H_