app_list: Fix SearchResultView crash

Fix the crash introduced in http://crrev.com/c/1351714 that deletes
the search-what-you-type result when showing the answer card. The
change to SearchResults model does not go through regular search
results update code path. Hence not handled properly. The CL fixes
the issue by making SearchResultView handle OnResultDestroying so
that its internal state is updated whenever underlying SearchResult
goes away.

Bug: 914891
Change-Id: Idc17516865333114e47b218d17d3629f50657f4a
Reviewed-on: https://chromium-review.googlesource.com/c/1378487
Reviewed-by: Alex Newcomer <newcomer@chromium.org>
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616782}
2 files changed