1 // Copyright 2015 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 UI_BASE_COCOA_TOOL_TIP_BASE_VIEW_H_
6 #define UI_BASE_COCOA_TOOL_TIP_BASE_VIEW_H_
8 #import <AppKit/AppKit.h>
10 #import "ui/base/cocoa/base_view.h"
12 // An NSiew that allows tooltip text to be set at the current mouse location. It
13 // can take effect immediately, but won't appear unless the tooltip delay has
16 @interface ToolTipBaseView
: BaseView
{
18 // These are part of the magic tooltip code from WebKit's WebHTMLView:
19 id trackingRectOwner_
; // (not retained)
20 void* trackingRectUserData_
;
21 NSTrackingRectTag lastToolTipTag_
;
22 base::scoped_nsobject
<NSString
> toolTip_
;
25 // Set the current tooltip. It is the responsibility of the caller to set a nil
26 // tooltip when the mouse cursor leaves the appropriate region.
27 - (void)setToolTipAtMousePoint
:(NSString
*)string
;
31 #endif // UI_BASE_COCOA_TOOL_TIP_BASE_VIEW_H_