[Embedded] Dismiss Assistant UI properly.

This CL fixed the bug that embedded UI will show on top of any
newly opened window instead of dismissing in tablet mode. Right
now in tablet mode the Assistant UI will dismiss when tapping on
empty space within AppList, or when other new window opens.

Tapping on the shelf will *not* hide Assistant UI by default, as
we aim to keep the behavior consistent among AppList pages (e.g.
search result page doesn't dismiss when tapping on shelf).

Misc:
Fix linter warning.

Bug: b/142549681
Test: run unittests added in this change.
Change-Id: I18a2424903f0523489a5fdea86cd29356623e0df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1925368
Commit-Queue: Meilin Wang <meilinw@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Xiaohui Chen <xiaohuic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719771}
10 files changed