Chromium Code Reviews| Index: ui/views/cocoa/bridged_content_view.h |
| diff --git a/ui/views/cocoa/bridged_content_view.h b/ui/views/cocoa/bridged_content_view.h |
| index 0d84c779483eaa2ecd31e9def7cd0b73c4826c8f..82e9e5b3bffd44e5b075eaa8155344f27c6c7d9f 100644 |
| --- a/ui/views/cocoa/bridged_content_view.h |
| +++ b/ui/views/cocoa/bridged_content_view.h |
| @@ -7,7 +7,9 @@ |
| #import <Cocoa/Cocoa.h> |
| +#include "base/strings/string16.h" |
| #import "ui/base/cocoa/tracking_area.h" |
| +#import "ui/base/cocoa/tool_tip_base_view.h" |
|
Andre
2015/05/13 19:33:13
Sorts before tracking_area.h.
tapted
2015/05/15 07:59:55
Done. I don't know why we don't just put .mm files
|
| namespace ui { |
| class TextInputClient; |
| @@ -21,7 +23,7 @@ class View; |
| // a views::RootView present. Bridges requests from Cocoa to the hosted |
| // views::View. |
| @interface BridgedContentView |
| - : NSView<NSTextInputClient, NSUserInterfaceValidations> { |
| + : ToolTipBaseView<NSTextInputClient, NSUserInterfaceValidations> { |
| @private |
| // Weak. The hosted RootView, owned by hostedView_->GetWidget(). |
| views::View* hostedView_; |
| @@ -31,10 +33,13 @@ class View; |
| ui::TextInputClient* textInputClient_; |
| // A tracking area installed to enable mouseMoved events. |
| - ui::ScopedCrTrackingArea trackingArea_; |
| + ui::ScopedCrTrackingArea cursorTrackingArea_; |
| // Whether the view is reacting to a keyDown event on the view. |
| BOOL inKeyDown_; |
| + |
| + // The last tooltip text, used to limit updates. |
| + base::string16 lastTooltipText_; |
| } |
| @property(readonly, nonatomic) views::View* hostedView; |
| @@ -49,6 +54,10 @@ class View; |
| // Process a mouse event captured while the widget had global mouse capture. |
| - (void)processCapturedMouseEvent:(NSEvent*)theEvent; |
| +// Mac's version of views::corewm::TooltipController::UpdateIfRequired(). |
| +// Updates the tooltip on the ToolTipBaseView if the text needs to change. |
| +- (void)updateTooltipIfRequiredAt:(const gfx::Point&)locationInWindow; |
|
Andre
2015/05/13 19:33:13
If I understand it correctly, the point is in this
tapted
2015/05/15 07:59:55
Very true - ui::LocatedEvent is a bit vague about
|
| + |
| @end |
| #endif // UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ |