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

Issue 2718073003: Views a11y: Convert View's NativeViewAccessibility to a unique_ptr. (Closed)

Created:
3 years, 9 months ago by Patti Lor
Modified:
3 years, 9 months ago
Reviewers:
tapted, dmazzoni, sky
CC:
chromium-reviews, aboxhall+watch_chromium.org, tfarina, nektar+watch_chromium.org, yuzo+watch_chromium.org, je_julie, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, mac-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Views a11y: Convert View's NativeViewAccessibility to a unique_ptr. Currently, instances of NativeViewAccessibility depend on NativeViewAccessibility::Destroy() being called in order to be released. By converting the Views NativeViewAccessibility member to a unique_ptr, it will be automatically destroyed with its corresponding View. BUG=610589 Review-Url: https://codereview.chromium.org/2718073003 Cr-Commit-Position: refs/heads/master@{#454808} Committed: https://chromium.googlesource.com/chromium/src/+/28468e05efc7fde6e9201a29a25b2f8904b5b5e4

Patch Set 1 #

Patch Set 2 : Fix compile error. #

Total comments: 8

Patch Set 3 : Review comments. #

Total comments: 2

Patch Set 4 : Fix long lived NVA in test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -48 lines) Patch
M ui/views/accessibility/native_view_accessibility.h View 1 2 3 chunks +6 lines, -7 lines 0 comments Download
M ui/views/accessibility/native_view_accessibility.cc View 1 2 3 chunks +6 lines, -6 lines 0 comments Download
M ui/views/accessibility/native_view_accessibility_auralinux.cc View 1 2 2 chunks +5 lines, -2 lines 0 comments Download
M ui/views/accessibility/native_view_accessibility_mac.mm View 1 chunk +6 lines, -2 lines 0 comments Download
M ui/views/accessibility/native_view_accessibility_unittest.cc View 1 chunk +2 lines, -6 lines 0 comments Download
M ui/views/accessibility/native_view_accessibility_win.cc View 1 2 2 chunks +7 lines, -6 lines 0 comments Download
M ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc View 1 2 3 1 chunk +8 lines, -8 lines 0 comments Download
M ui/views/view.h View 1 chunk +2 lines, -3 lines 0 comments Download
M ui/views/view.cc View 3 chunks +2 lines, -8 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 35 (23 generated)
Patti Lor
Ignored elements CL part 1 :)
3 years, 9 months ago (2017-02-28 05:24:47 UTC) #10
dmazzoni
lgtm
3 years, 9 months ago (2017-02-28 05:41:20 UTC) #12
tapted
lgtm % nits (sky should take a look at the views::View changes though) Thanks! https://codereview.chromium.org/2718073003/diff/20001/ui/views/accessibility/native_view_accessibility.cc ...
3 years, 9 months ago (2017-02-28 06:29:12 UTC) #13
Patti Lor
Hi sky@, PTAL at changes in ui/views/view.*. Thanks! https://codereview.chromium.org/2718073003/diff/20001/ui/views/accessibility/native_view_accessibility.cc File ui/views/accessibility/native_view_accessibility.cc (right): https://codereview.chromium.org/2718073003/diff/20001/ui/views/accessibility/native_view_accessibility.cc#newcode21 ui/views/accessibility/native_view_accessibility.cc:21: return ...
3 years, 9 months ago (2017-02-28 22:24:25 UTC) #19
sky
Are there any dependencies in NativeViewAccessibility back on the View that could be problematic now ...
3 years, 9 months ago (2017-03-01 00:27:08 UTC) #20
Patti Lor
No, I don't think so - nothing in the destructor seems to need |view_| and ...
3 years, 9 months ago (2017-03-01 07:13:14 UTC) #23
sky
LGTM - but I would like Domninic to give a final approval on the lifetime ...
3 years, 9 months ago (2017-03-01 17:09:45 UTC) #26
Patti Lor
Ping for dmazzoni@ - PTAL at sky's comments, thank you!
3 years, 9 months ago (2017-03-03 02:49:33 UTC) #27
dmazzoni
Still lgtm Good question, but this should be totally fine. It shouldn't have ever called ...
3 years, 9 months ago (2017-03-03 08:48:34 UTC) #28
Patti Lor
Awesome, thanks all.
3 years, 9 months ago (2017-03-06 00:46:12 UTC) #29
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/2718073003/60001
3 years, 9 months ago (2017-03-06 00:46:39 UTC) #32
commit-bot: I haz the power
3 years, 9 months ago (2017-03-06 01:48:49 UTC) #35
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/28468e05efc7fde6e9201a29a25b...

Powered by Google App Engine
This is Rietveld 408576698