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

Issue 251493002: MacViews: Implement basic NSEvent -> ui::Event conversion for Mac (Closed)

Created:
6 years, 8 months ago by tapted
Modified:
6 years, 7 months ago
Reviewers:
Robert Sesek, sadrul
CC:
chromium-reviews, rjkroege, kalyank, ozone-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org, mac-views-reviews_chromium.org
Visibility:
Public.

Description

MacViews: Implement basic NSEvent -> ui::Event conversion for Mac Mac currently links events_stub.cc. This change adds an events_mac.mm allowing basic ui::Event fields to be populated for keyboard and mouse. To implement CopyNativeEvent on Mac, some objective C code needs to be called. Part of this change moves CopyNativeEvent from an anonymous namespace to platform-specific events_foo.cc/mm, and adds a corresponding ReleaseCopiedNativeEvent. BUG=366021 TEST=events_unittests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266743

Patch Set 1 : similarity-20 #

Patch Set 2 : selfnit #

Total comments: 11

Patch Set 3 : rebase #

Patch Set 4 : address comments #

Total comments: 11

Patch Set 5 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -161 lines) Patch
M ui/events/cocoa/cocoa_event_utils.mm View 1 chunk +0 lines, -5 lines 0 comments Download
D ui/events/cocoa/cocoa_event_utils_unittest.mm View 1 chunk +0 lines, -79 lines 0 comments Download
A + ui/events/cocoa/events_mac.mm View 1 2 3 4 3 chunks +104 lines, -22 lines 0 comments Download
A + ui/events/cocoa/events_mac_unittest.mm View 1 3 4 2 chunks +171 lines, -7 lines 0 comments Download
M ui/events/event.h View 1 chunk +0 lines, -4 lines 0 comments Download
M ui/events/event.cc View 8 chunks +5 lines, -40 lines 0 comments Download
M ui/events/event_utils.h View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
M ui/events/events.gyp View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M ui/events/events_stub.cc View 1 2 3 4 2 chunks +9 lines, -2 lines 0 comments Download
M ui/events/ozone/events_ozone.cc View 1 1 chunk +7 lines, -0 lines 0 comments Download
M ui/events/win/events_win.cc View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M ui/events/x/events_x.cc View 1 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
tapted
Hi sadrul, please take a look. https://codereview.chromium.org/251493002/diff/40001/ui/events/event.cc File ui/events/event.cc (right): https://codereview.chromium.org/251493002/diff/40001/ui/events/event.cc#newcode134 ui/events/event.cc:134: native_event_(base::NativeEvent()), (C++ value ...
6 years, 8 months ago (2014-04-24 11:43:30 UTC) #1
sadrul
I am not familiar with cocoa. So you should have someone else review that code. ...
6 years, 8 months ago (2014-04-24 19:47:11 UTC) #2
tapted
+rsesek Thanks Sadrul! Robert - can I borrow your Cocoa expertise for a review? https://codereview.chromium.org/251493002/diff/40001/ui/events/cocoa/events_mac.mm ...
6 years, 8 months ago (2014-04-25 03:44:54 UTC) #3
sadrul
lgtm (sans the cocoa review from rsesek@) https://codereview.chromium.org/251493002/diff/80001/ui/events/cocoa/events_mac.mm File ui/events/cocoa/events_mac.mm (right): https://codereview.chromium.org/251493002/diff/80001/ui/events/cocoa/events_mac.mm#newcode90 ui/events/cocoa/events_mac.mm:90: return gfx::Point(0, ...
6 years, 8 months ago (2014-04-25 11:40:27 UTC) #4
Robert Sesek
https://codereview.chromium.org/251493002/diff/80001/ui/events/cocoa/events_mac.mm File ui/events/cocoa/events_mac.mm (right): https://codereview.chromium.org/251493002/diff/80001/ui/events/cocoa/events_mac.mm#newcode67 ui/events/cocoa/events_mac.mm:67: default: Shouldn't the default case also be NOTIMPLEMENTED()? https://codereview.chromium.org/251493002/diff/80001/ui/events/cocoa/events_mac.mm#newcode78 ...
6 years, 8 months ago (2014-04-25 15:39:23 UTC) #5
tapted
https://codereview.chromium.org/251493002/diff/80001/ui/events/cocoa/events_mac.mm File ui/events/cocoa/events_mac.mm (right): https://codereview.chromium.org/251493002/diff/80001/ui/events/cocoa/events_mac.mm#newcode67 ui/events/cocoa/events_mac.mm:67: default: On 2014/04/25 15:39:23, rsesek wrote: > Shouldn't the ...
6 years, 7 months ago (2014-04-28 07:39:49 UTC) #6
Robert Sesek
LGTM https://codereview.chromium.org/251493002/diff/80001/ui/events/cocoa/events_mac.mm File ui/events/cocoa/events_mac.mm (right): https://codereview.chromium.org/251493002/diff/80001/ui/events/cocoa/events_mac.mm#newcode78 ui/events/cocoa/events_mac.mm:78: base::TimeDelta EventTimeFromNative(const base::NativeEvent& native_event) { On 2014/04/28 07:39:49, ...
6 years, 7 months ago (2014-04-28 18:51:32 UTC) #7
tapted
The CQ bit was checked by tapted@chromium.org
6 years, 7 months ago (2014-04-28 23:42:38 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tapted@chromium.org/251493002/120001
6 years, 7 months ago (2014-04-28 23:43:31 UTC) #9
commit-bot: I haz the power
6 years, 7 months ago (2014-04-29 02:32:08 UTC) #10
Message was sent while issue was closed.
Change committed as 266743

Powered by Google App Engine
This is Rietveld 408576698