Add std::unique_ptr<T> override of View::AddChildView()

This CL adds an AddChildView(std::unique_ptr<T>) override for adding child
views to View.
This alternative makes the ownership passing more clear at callsites
than passing a raw pointer.

The existing AddChildView(View*) interface remains unchanged.

Change-Id: Iad28b5ffc4adc244d83d2a2853ac0e4606a17ad7
Commit-Queue: Alan Cutter <>
Reviewed-by: Scott Violet <>
Reviewed-by: Peter Kasting <>
Cr-Commit-Position: refs/heads/master@{#615031}
4 files changed