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

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

Issue 1528153004: Look Up on Force Touch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit 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 #include <stdint.h> 10 #include <stdint.h>
(...skipping 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 event.skip_in_browser = true; 2301 event.skip_in_browser = true;
2302 widgetHost->ForwardKeyboardEvent(event); 2302 widgetHost->ForwardKeyboardEvent(event);
2303 } 2303 }
2304 } 2304 }
2305 2305
2306 // Possibly autohide the cursor. 2306 // Possibly autohide the cursor.
2307 if ([RenderWidgetHostViewCocoa shouldAutohideCursorForEvent:theEvent]) 2307 if ([RenderWidgetHostViewCocoa shouldAutohideCursorForEvent:theEvent])
2308 [NSCursor setHiddenUntilMouseMoves:YES]; 2308 [NSCursor setHiddenUntilMouseMoves:YES];
2309 } 2309 }
2310 2310
2311 - (void)forceTouchEvent:(NSEvent*)theEvent {
2312 [self quickLookWithEvent:theEvent];
2313 }
2314
2311 - (void)shortCircuitScrollWheelEvent:(NSEvent*)event { 2315 - (void)shortCircuitScrollWheelEvent:(NSEvent*)event {
2312 DCHECK(base::mac::IsOSLionOrLater()); 2316 DCHECK(base::mac::IsOSLionOrLater());
2313 2317
2314 if ([event phase] != NSEventPhaseEnded && 2318 if ([event phase] != NSEventPhaseEnded &&
2315 [event phase] != NSEventPhaseCancelled) { 2319 [event phase] != NSEventPhaseCancelled) {
2316 return; 2320 return;
2317 } 2321 }
2318 2322
2319 if (renderWidgetHostView_->render_widget_host_) { 2323 if (renderWidgetHostView_->render_widget_host_) {
2320 // History-swiping is not possible if the logic reaches this point. 2324 // History-swiping is not possible if the logic reaches this point.
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
3434 3438
3435 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3439 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3436 // regions that are not draggable. (See ControlRegionView in 3440 // regions that are not draggable. (See ControlRegionView in
3437 // native_app_window_cocoa.mm). This requires the render host view to be 3441 // native_app_window_cocoa.mm). This requires the render host view to be
3438 // draggable by default. 3442 // draggable by default.
3439 - (BOOL)mouseDownCanMoveWindow { 3443 - (BOOL)mouseDownCanMoveWindow {
3440 return YES; 3444 return YES;
3441 } 3445 }
3442 3446
3443 @end 3447 @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