diff options
| author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 11:42:31 +0000 |
|---|---|---|
| committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 11:42:31 +0000 |
| commit | 979fb44f0b83dd2a62e84012c188b51f6ccd809f (patch) | |
| tree | 69ab8193f7332a7f10b09986489068730dabbf2f /chrome/browser/renderer_host/render_widget_host_view_mac.h | |
| parent | b5eaa17a2458c92a5b55d5546fc722b5adf413c8 (diff) | |
| download | chromium_src-979fb44f0b83dd2a62e84012c188b51f6ccd809f.zip chromium_src-979fb44f0b83dd2a62e84012c188b51f6ccd809f.tar.gz chromium_src-979fb44f0b83dd2a62e84012c188b51f6ccd809f.tar.bz2 | |
Use native Cocoa tooltips instead of Mozilla's ToolTip class.
This makes tooltips behave more normally, and fixes some of the bugs. Patch by Jens Alfke (snej@google.com)
BUG=15655
TEST=tooltips should feel more like native tooltips
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20019 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_widget_host_view_mac.h')
| -rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_mac.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.h b/chrome/browser/renderer_host/render_widget_host_view_mac.h index 34d5733..617d495 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_mac.h +++ b/chrome/browser/renderer_host/render_widget_host_view_mac.h @@ -35,10 +35,17 @@ class RWHVMEditCommandHelper; BOOL canBeKeyView_; BOOL closeOnDeactivate_; scoped_ptr<RWHVMEditCommandHelper> editCommand_helper_; + + // These are part of the magic tooltip code from WebKit's WebHTMLView: + id trackingRectOwner_; // (not retained) + void *trackingRectUserData_; + NSTrackingRectTag lastToolTipTag_; + NSString* toolTip_; } - (void)setCanBeKeyView:(BOOL)can; - (void)setCloseOnDeactivate:(BOOL)b; +- (void)setToolTipAtMousePoint:(NSString *)string; @end @@ -141,13 +148,8 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView { // true if the View is not visible. bool is_hidden_; - // Tooltips // The text to be shown in the tooltip, supplied by the renderer. std::wstring tooltip_text_; - // Used to display tooltips. We can't use the [NSView -setToolTip:] methods - // because we need to be able to show and hide the tooltip without the mouse - // leaving a region and NSView isn't set up for that to happen. - scoped_nsobject<ToolTip> tooltip_; // Factory used to safely scope delayed calls to ShutdownHost(). ScopedRunnableMethodFactory<RenderWidgetHostViewMac> shutdown_factory_; |
