Adds notification when a viewmanagerclient is unembedded
commit3cb0ffe5d45628e02aea032e4edc89e08a1ecac5
authorsky <sky@chromium.org>
Wed, 5 Aug 2015 23:21:13 +0000 (5 16:21 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 5 Aug 2015 23:21:45 +0000 (5 23:21 +0000)
tree3a15eee81c3d03e3a51b92aab9f546aa97ca5643
parentb3dcc8f78eafcc0c8a5ae0cad0c8c79ee73b7c37
Adds notification when a viewmanagerclient is unembedded

Currently clients see OnViewDeleted(), which means the client has no
way to discern between a deletion and another app getting
embedded.

This is necessary so that html_viewer knows when it needs to swap what is a local frame to a remote frame. Currently html viewer sees the view as being destroyed and deletes the frame. If another frame is being embedded then deleting the frame isn't the right thing, instead the frame needs to be converted to remote. Adding OnUnembed() allows html viewer to detect the reuse case.

BUG=479172,490221
TEST=covered by tests
R=fsamuel@chromium.org

Review URL: https://codereview.chromium.org/1276723003

Cr-Commit-Position: refs/heads/master@{#342004}
components/view_manager/public/cpp/lib/view_manager_client_impl.cc
components/view_manager/public/cpp/lib/view_manager_client_impl.h
components/view_manager/public/cpp/lib/view_manager_delegate.cc
components/view_manager/public/cpp/view_manager_delegate.h
components/view_manager/public/interfaces/view_manager.mojom
components/view_manager/test_change_tracker.cc
components/view_manager/test_change_tracker.h
components/view_manager/view_manager_service_apptest.cc
components/view_manager/view_manager_service_impl.cc
components/view_manager/view_manager_service_unittest.cc