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

Issue 6347002: touch: Return an enum from OnTouchEvent. (Closed)

Created:
9 years, 11 months ago by sadrul
Modified:
9 years, 6 months ago
Reviewers:
rjkroege, sky
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

touch: Return an enum from OnTouchEvent. The enum returned from OnTouchEvent reflects the current status of the touch-sequence. This can be used by the RootView to determine when the touch-event-handler should be reset. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71677

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use OnTouchEvent to notify of touch-sequence status. #

Patch Set 3 : Update tests, add a missed case. #

Total comments: 2

Patch Set 4 : Add TODO, look for TOUCH_STATUS_START. #

Total comments: 4

Patch Set 5 : comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -25 lines) Patch
M chrome/browser/renderer_host/render_widget_host_view_views.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_views.cc View 1 2 3 5 chunks +17 lines, -4 lines 0 comments Download
M views/focus/accelerator_handler_touch.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M views/touchui/gesture_manager.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M views/view.h View 1 2 3 4 3 chunks +16 lines, -4 lines 0 comments Download
M views/view.cc View 1 2 3 4 2 chunks +4 lines, -5 lines 0 comments Download
M views/view_unittest.cc View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M views/widget/root_view.h View 1 1 chunk +1 line, -1 line 0 comments Download
M views/widget/root_view.cc View 1 2 3 4 chunks +17 lines, -6 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
sadrul
Please add additional reviewers as you see fit.
9 years, 11 months ago (2011-01-14 21:05:02 UTC) #1
sadrul
OWNERS files have just been added :)
9 years, 11 months ago (2011-01-14 21:26:37 UTC) #2
sky
http://codereview.chromium.org/6347002/diff/1/chrome/browser/renderer_host/render_widget_host_view_views.cc File chrome/browser/renderer_host/render_widget_host_view_views.cc (right): http://codereview.chromium.org/6347002/diff/1/chrome/browser/renderer_host/render_widget_host_view_views.cc#newcode738 chrome/browser/renderer_host/render_widget_host_view_views.cc:738: if (touch_event_.touchPointsLength == 0) { This pattern is much ...
9 years, 11 months ago (2011-01-14 21:47:20 UTC) #3
sadrul
http://codereview.chromium.org/6347002/diff/1/chrome/browser/renderer_host/render_widget_host_view_views.cc File chrome/browser/renderer_host/render_widget_host_view_views.cc (right): http://codereview.chromium.org/6347002/diff/1/chrome/browser/renderer_host/render_widget_host_view_views.cc#newcode738 chrome/browser/renderer_host/render_widget_host_view_views.cc:738: if (touch_event_.touchPointsLength == 0) { On 2011/01/14 21:47:20, sky ...
9 years, 11 months ago (2011-01-14 22:11:33 UTC) #4
sky
On Fri, Jan 14, 2011 at 2:11 PM, <sadrul@chromium.org> wrote: > > http://codereview.chromium.org/6347002/diff/1/chrome/browser/renderer_host/render_widget_host_view_views.cc > File ...
9 years, 11 months ago (2011-01-14 22:18:29 UTC) #5
rjkroege
On 2011/01/14 22:18:29, sky wrote: > On Fri, Jan 14, 2011 at 2:11 PM, <mailto:sadrul@chromium.org> ...
9 years, 11 months ago (2011-01-14 23:16:28 UTC) #6
sadrul
On 2011/01/14 22:18:29, sky wrote: [snip] > > > > Another alternate solution considered was ...
9 years, 11 months ago (2011-01-14 23:22:04 UTC) #7
sky
Sorry for not being clear. It sounded like from the email there was some state ...
9 years, 11 months ago (2011-01-14 23:29:53 UTC) #8
rjkroege
On 2011/01/14 23:29:53, sky wrote: > Sorry for not being clear. > > It sounded ...
9 years, 11 months ago (2011-01-14 23:45:14 UTC) #9
sadrul
On 2011/01/14 23:29:53, sky wrote: > Sorry for not being clear. > > It sounded ...
9 years, 11 months ago (2011-01-15 00:17:01 UTC) #10
rjkroege
LGTM (with nits) http://codereview.chromium.org/6347002/diff/20001/views/widget/root_view.cc File views/widget/root_view.cc (right): http://codereview.chromium.org/6347002/diff/20001/views/widget/root_view.cc#newcode358 views/widget/root_view.cc:358: gesture_manager_->ProcessTouchEventForGesture(e, this, handled); there should probably ...
9 years, 11 months ago (2011-01-17 19:27:39 UTC) #11
sadrul
I made a change: a View needs to return TOUCH_STATUS_START to notify the RootView that ...
9 years, 11 months ago (2011-01-18 03:50:15 UTC) #12
sky
LGTM http://codereview.chromium.org/6347002/diff/26001/views/view.cc File views/view.cc (right): http://codereview.chromium.org/6347002/diff/26001/views/view.cc#newcode546 views/view.cc:546: const TouchStatus status = OnTouchEvent(e); return OnTouchEvent(e); Also, ...
9 years, 11 months ago (2011-01-18 17:16:49 UTC) #13
sadrul
9 years, 11 months ago (2011-01-18 18:48:20 UTC) #14
http://codereview.chromium.org/6347002/diff/26001/views/view.cc
File views/view.cc (right):

http://codereview.chromium.org/6347002/diff/26001/views/view.cc#newcode546
views/view.cc:546: const TouchStatus status = OnTouchEvent(e);
On 2011/01/18 17:16:50, sky wrote:
> return OnTouchEvent(e);
> Also, we generally don't use const in cases like this.

Noted, and fixed. Thanks.

http://codereview.chromium.org/6347002/diff/26001/views/view.h
File views/view.h (right):

http://codereview.chromium.org/6347002/diff/26001/views/view.h#newcode137
views/view.h:137: enum TouchStatus {
On 2011/01/18 17:16:50, sky wrote:
> Please document what these values mean.

Done.

Powered by Google App Engine
This is Rietveld 408576698