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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 1575113002: Implementation for Look Up on Force Touch. If the user force touched a word in the web content the … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | ui/base/cocoa/base_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #import <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <OpenGL/gl.h> 8 #include <OpenGL/gl.h>
9 #include <QuartzCore/QuartzCore.h> 9 #include <QuartzCore/QuartzCore.h>
10 10
(...skipping 2291 matching lines...) Expand 10 before | Expand all | Expand 10 after
2302 event.skip_in_browser = true; 2302 event.skip_in_browser = true;
2303 widgetHost->ForwardKeyboardEvent(event); 2303 widgetHost->ForwardKeyboardEvent(event);
2304 } 2304 }
2305 } 2305 }
2306 2306
2307 // Possibly autohide the cursor. 2307 // Possibly autohide the cursor.
2308 if ([RenderWidgetHostViewCocoa shouldAutohideCursorForEvent:theEvent]) 2308 if ([RenderWidgetHostViewCocoa shouldAutohideCursorForEvent:theEvent])
2309 [NSCursor setHiddenUntilMouseMoves:YES]; 2309 [NSCursor setHiddenUntilMouseMoves:YES];
2310 } 2310 }
2311 2311
2312 - (void)forceTouchEvent:(NSEvent*)theEvent {
2313 [self quickLookWithEvent:theEvent];
2314 }
2315
2312 - (void)shortCircuitScrollWheelEvent:(NSEvent*)event { 2316 - (void)shortCircuitScrollWheelEvent:(NSEvent*)event {
2313 DCHECK(base::mac::IsOSLionOrLater()); 2317 DCHECK(base::mac::IsOSLionOrLater());
2314 2318
2315 if ([event phase] != NSEventPhaseEnded && 2319 if ([event phase] != NSEventPhaseEnded &&
2316 [event phase] != NSEventPhaseCancelled) { 2320 [event phase] != NSEventPhaseCancelled) {
2317 return; 2321 return;
2318 } 2322 }
2319 2323
2320 if (renderWidgetHostView_->render_widget_host_) { 2324 if (renderWidgetHostView_->render_widget_host_) {
2321 // History-swiping is not possible if the logic reaches this point. 2325 // History-swiping is not possible if the logic reaches this point.
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
3437 3441
3438 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3442 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3439 // regions that are not draggable. (See ControlRegionView in 3443 // regions that are not draggable. (See ControlRegionView in
3440 // native_app_window_cocoa.mm). This requires the render host view to be 3444 // native_app_window_cocoa.mm). This requires the render host view to be
3441 // draggable by default. 3445 // draggable by default.
3442 - (BOOL)mouseDownCanMoveWindow { 3446 - (BOOL)mouseDownCanMoveWindow {
3443 return YES; 3447 return YES;
3444 } 3448 }
3445 3449
3446 @end 3450 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | ui/base/cocoa/base_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698