Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(833)

Unified Diff: ui/base/cocoa/tool_tip_base_view.h

Issue 1137653005: MacViews: Implement Tooltips (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: respond to comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/BUILD.gn ('k') | ui/base/cocoa/tool_tip_base_view.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cocoa/tool_tip_base_view.h
diff --git a/ui/base/cocoa/tool_tip_base_view.h b/ui/base/cocoa/tool_tip_base_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..259ae9cd9af3d97c73f4edd54bbab753cd5eca6e
--- /dev/null
+++ b/ui/base/cocoa/tool_tip_base_view.h
@@ -0,0 +1,31 @@
+// Copyright 2015 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 UI_BASE_COCOA_TOOL_TIP_BASE_VIEW_H_
+#define UI_BASE_COCOA_TOOL_TIP_BASE_VIEW_H_
+
+#import <AppKit/AppKit.h>
+
+#import "ui/base/cocoa/base_view.h"
+
+// An NSiew that allows tooltip text to be set at the current mouse location. It
+// can take effect immediately, but won't appear unless the tooltip delay has
+// elapsed.
+UI_BASE_EXPORT
+@interface ToolTipBaseView : BaseView {
+ @private
+ // These are part of the magic tooltip code from WebKit's WebHTMLView:
+ id trackingRectOwner_; // (not retained)
+ void* trackingRectUserData_;
+ NSTrackingRectTag lastToolTipTag_;
+ base::scoped_nsobject<NSString> toolTip_;
+}
+
+// Set the current tooltip. It is the responsibility of the caller to set a nil
+// tooltip when the mouse cursor leaves the appropriate region.
+- (void)setToolTipAtMousePoint:(NSString*)string;
+
+@end
+
+#endif // UI_BASE_COCOA_TOOL_TIP_BASE_VIEW_H_
« no previous file with comments | « ui/base/BUILD.gn ('k') | ui/base/cocoa/tool_tip_base_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698