views: introduce unique_ptr variants of Widget::CreateWindowWith
These methods express that the caller is passing in ownership of the delegate, and assert that the delegate believes it is owned by the widget. This change also corrects a flaw in ownership handling in an ash unittest: some of the created delegates were passed around as raw pointers, and one was sort of leaked (not actually leaked, but destroyed in an extremely non-obvious way). Bug: 1075649 Change-Id: I655dfe3e2466032b85247341f43b1b2d75c0b561 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2446015Reviewed-by:Peter Boström <pbos@chromium.org> Reviewed-by:
Scott Violet <sky@chromium.org> Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org> Cr-Commit-Position: refs/heads/master@{#813416}
Showing
Please register or sign in to comment