[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / styled_text_field.h
blob68a65b77529a40844412e168e1f4ec24d66f15f9
1 // Copyright (c) 2009 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 #import <Cocoa/Cocoa.h>
7 @class StyledTextFieldCell;
9 // An implementation of NSTextField that is designed to work with
10 // StyledTextFieldCell. Provides methods to redraw the field when cell
11 // decorations have changed and overrides |mouseDown:| to properly handle clicks
12 // in sections of the cell with decorations.
13 @interface StyledTextField : NSTextField {
16 // Repositions and redraws the field editor. Call this method when the cell's
17 // text frame has changed (whenever changing cell decorations).
18 - (void)resetFieldEditorFrameIfNeeded;
20 // Returns the amount of the field's width which is not being taken up
21 // by the text contents. May be negative if the contents are large
22 // enough to scroll.
23 - (CGFloat)availableDecorationWidth;
25 @end
27 @interface StyledTextField (ExposedForTesting)
28 - (StyledTextFieldCell*)styledTextFieldCell;
29 @end