Use std::unique_ptr<> for ScrollView::SetContents & SetHeader.

As part of an effort to cleanup and normalize the View API, object ownership is one of the
least clear aspects. Like the addition of View::AddChildView(std::unique_ptr<>...), this does
the same for ScrollView. SetContents and SetHeader take ownership of the view parameter and
will delete the old version if a new one is set. This makes this behavior more clear and
forces the client code to act accordingly.

Bug: 942226
Change-Id: I6397c8c177a3657d1d24d937ba6fb82acbfb7692
Commit-Queue: Allen Bauer <>
Reviewed-by: Scott Violet <>
Cr-Commit-Position: refs/heads/master@{#642712}
37 files changed