| Index: content/browser/renderer_host/render_widget_host_view_mac.mm
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
| index f629849be367f06efb3a81d6496029f30cf7a7e0..d6ecc9061b5b3ec8f11c1b8df667fa976e0fbbde 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
| +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
| @@ -2795,6 +2795,24 @@ SkBitmap::Config RenderWidgetHostViewMac::PreferredReadbackFormat() {
|
| [responderDelegate_ touchesEndedWithEvent:event];
|
| }
|
|
|
| +// This is invoked only on 10.8 or newer when the user taps a word using
|
| +// three fingers.
|
| +- (void)quickLookWithEvent:(NSEvent*)event {
|
| + NSPoint point = [self convertPoint:[event locationInWindow] fromView:nil];
|
| + TextInputClientMac::GetInstance()->GetStringAtPoint(
|
| + renderWidgetHostView_->render_widget_host_,
|
| + gfx::Point(point.x, NSHeight([self frame]) - point.y),
|
| + ^(NSAttributedString* string, NSPoint baselinePoint) {
|
| + if (string && [string length] > 0) {
|
| + dispatch_async(dispatch_get_main_queue(), ^{
|
| + [self showDefinitionForAttributedString:string
|
| + atPoint:baselinePoint];
|
| + });
|
| + }
|
| + }
|
| + );
|
| +}
|
| +
|
| // This method handles 2 different types of hardware events.
|
| // (Apple does not distinguish between them).
|
| // a. Scrolling the middle wheel of a mouse.
|
|
|