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

Issue 2690573002: MacViews: Handle three-finger swipe gestures for navigation. (Closed)

Created:
3 years, 10 months ago by themblsha
Modified:
3 years, 9 months ago
Reviewers:
tapted, sky
CC:
chromium-reviews, tfarina, mac-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Handle three-finger swipe gestures for navigation. It's possible to enable three-finger swipes in System Preferences, and they result in immediate -swipeWithEvent: calls, unlike two-finger swipes which should be tracked. Added code to convert them to ET_GESTURE_SWIPE and to handle them in BrowserView. Cocoa code handled these events in BrowserWindowController in a similar fashion. BUG=691558 Review-Url: https://codereview.chromium.org/2690573002 Cr-Commit-Position: refs/heads/master@{#453199} Committed: https://chromium.googlesource.com/chromium/src/+/fbb7fb60fb7ceaf4f737c638bbd502d26fe129b3

Patch Set 1 #

Total comments: 37

Patch Set 2 : Address CL isues. #

Total comments: 3

Patch Set 3 : Address CL issues. #

Patch Set 4 : Add ViewMacTest.HandlesThreeFingerSwipeGestures. #

Total comments: 30

Patch Set 5 : Address CL issues. #

Total comments: 7

Patch Set 6 : Address sky's CL issues. #

Patch Set 7 : Fix compilation on Windows. #

Total comments: 2

Patch Set 8 : GetGestureCommand: return early in happy path. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+203 lines, -0 lines) Patch
M chrome/browser/ui/views/frame/browser_view.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 4 5 6 7 2 chunks +29 lines, -0 lines 0 comments Download
M ui/views/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/cocoa/bridged_content_view.mm View 1 2 3 4 1 chunk +28 lines, -0 lines 0 comments Download
A ui/views/view_unittest_mac.mm View 1 2 3 4 1 chunk +144 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (7 generated)
themblsha
I want to add a test as well, but haven't found a place for it ...
3 years, 10 months ago (2017-02-10 15:45:51 UTC) #3
sky
https://codereview.chromium.org/2690573002/diff/1/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/2690573002/diff/1/chrome/browser/ui/views/frame/browser_view.cc#newcode1985 chrome/browser/ui/views/frame/browser_view.cc:1985: if (event->details().type() == ui::ET_GESTURE_SWIPE) { Can you structure this ...
3 years, 10 months ago (2017-02-10 19:08:33 UTC) #4
tapted
Can you add a BUG=? There's probably more to do for this, and we should ...
3 years, 10 months ago (2017-02-13 11:26:25 UTC) #5
themblsha
Still need to work on the test :-) https://codereview.chromium.org/2690573002/diff/1/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/2690573002/diff/1/chrome/browser/ui/views/frame/browser_view.cc#newcode1985 chrome/browser/ui/views/frame/browser_view.cc:1985: if ...
3 years, 10 months ago (2017-02-15 17:35:35 UTC) #7
tapted
https://codereview.chromium.org/2690573002/diff/1/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/2690573002/diff/1/chrome/browser/ui/views/frame/browser_view.cc#newcode1987 chrome/browser/ui/views/frame/browser_view.cc:1987: if (event->details().swipe_left()) On 2017/02/15 17:35:34, themblsha wrote: > On ...
3 years, 10 months ago (2017-02-15 22:25:53 UTC) #8
themblsha
Started work on ui/views/view_unittest_mac.mm, but not finished yet. https://codereview.chromium.org/2690573002/diff/1/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/2690573002/diff/1/chrome/browser/ui/views/frame/browser_view.cc#newcode1987 chrome/browser/ui/views/frame/browser_view.cc:1987: if ...
3 years, 10 months ago (2017-02-16 15:27:50 UTC) #9
themblsha
The test is here :-)
3 years, 10 months ago (2017-02-20 16:43:11 UTC) #10
tapted
https://codereview.chromium.org/2690573002/diff/60001/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/2690573002/diff/60001/chrome/browser/ui/views/frame/browser_view.cc#newcode1964 chrome/browser/ui/views/frame/browser_view.cc:1964: } I'm undecided about base::Optional and the lambda here. ...
3 years, 10 months ago (2017-02-20 23:14:22 UTC) #11
themblsha
https://codereview.chromium.org/2690573002/diff/60001/ui/views/cocoa/bridged_content_view.mm File ui/views/cocoa/bridged_content_view.mm (right): https://codereview.chromium.org/2690573002/diff/60001/ui/views/cocoa/bridged_content_view.mm#newcode822 ui/views/cocoa/bridged_content_view.mm:822: // support -[NSEvent eventNumber]. This doesn't seem like a ...
3 years, 10 months ago (2017-02-21 13:00:52 UTC) #12
tapted
lgtm, but you need sky@ for browser_view.cc https://codereview.chromium.org/2690573002/diff/60001/ui/views/view_unittest_mac.mm File ui/views/view_unittest_mac.mm (right): https://codereview.chromium.org/2690573002/diff/60001/ui/views/view_unittest_mac.mm#newcode37 ui/views/view_unittest_mac.mm:37: return static_cast<NSEventSubtype>(0); ...
3 years, 10 months ago (2017-02-22 00:04:44 UTC) #13
sky
Just style stuff. https://codereview.chromium.org/2690573002/diff/80001/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/2690573002/diff/80001/chrome/browser/ui/views/frame/browser_view.cc#newcode1943 chrome/browser/ui/views/frame/browser_view.cc:1943: auto get_gesture_command = [](ui::GestureEvent* event, IMO ...
3 years, 10 months ago (2017-02-22 00:37:17 UTC) #14
themblsha
https://codereview.chromium.org/2690573002/diff/80001/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/2690573002/diff/80001/chrome/browser/ui/views/frame/browser_view.cc#newcode1943 chrome/browser/ui/views/frame/browser_view.cc:1943: auto get_gesture_command = [](ui::GestureEvent* event, On 2017/02/22 00:37:17, sky ...
3 years, 10 months ago (2017-02-22 11:49:50 UTC) #15
themblsha
3 years, 10 months ago (2017-02-22 15:18:49 UTC) #16
sky
LGTM https://codereview.chromium.org/2690573002/diff/80001/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/2690573002/diff/80001/chrome/browser/ui/views/frame/browser_view.cc#newcode1943 chrome/browser/ui/views/frame/browser_view.cc:1943: auto get_gesture_command = [](ui::GestureEvent* event, On 2017/02/22 11:49:50, ...
3 years, 10 months ago (2017-02-22 17:34:10 UTC) #17
themblsha
https://codereview.chromium.org/2690573002/diff/80001/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): https://codereview.chromium.org/2690573002/diff/80001/chrome/browser/ui/views/frame/browser_view.cc#newcode1943 chrome/browser/ui/views/frame/browser_view.cc:1943: auto get_gesture_command = [](ui::GestureEvent* event, On 2017/02/22 17:34:10, sky ...
3 years, 9 months ago (2017-02-27 11:49:16 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2690573002/140001
3 years, 9 months ago (2017-02-27 11:49:32 UTC) #21
commit-bot: I haz the power
3 years, 9 months ago (2017-02-27 13:26:01 UTC) #24
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/fbb7fb60fb7ceaf4f737c638bbd5...

Powered by Google App Engine
This is Rietveld 408576698