blob: a85bb1b9c34e0e23aa27df7f084f8bdf61b27245 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SECTION_VIEW_H_
#define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SECTION_VIEW_H_
#import <Cocoa/Cocoa.h>
#import "ui/base/cocoa/base_view.h"
// Main view for autofill sections. Takes care of hover highlight if needed.
// Tracking areas are subtle and quick to anger. BaseView does the right thing.
@interface AutofillSectionView : BaseView {
@private
NSControl* clickTarget_; // Target for mouse clicks, weak.
BOOL isHighlighted_; // Track current highlight state.
BOOL shouldHighlightOnHover_; // Indicates if view should highlight on hover
}
// Resets tracking info. Useful if e.g. the mouse has changed inside/outside
// status during a popup menu's runloop.
- (void)updateHoverState;
// Target for any mouse click.
@property(assign, nonatomic) NSControl* clickTarget;
// Color used to highlight the view on hover.
@property(readonly, nonatomic, getter=hoverColor) NSColor* hoverColor;
// Controls if the view should show a highlight when hovered over.
@property(assign, nonatomic) BOOL shouldHighlightOnHover;
// Current highlighting state.
@property(readonly, nonatomic) BOOL isHighlighted;
@end
#endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_SECTION_VIEW_H_
|