Changes ownership of ViewManager
commit35c0b8cd879b1ac806d8869a81878c9fb47a7c17
authorsky <sky@chromium.org>
Thu, 28 May 2015 23:56:18 +0000 (28 16:56 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 28 May 2015 23:56:50 +0000 (28 23:56 +0000)
treea08c64f82ca6fd043b3266e98059cd760db74cfc
parent60bbd25b7306994330adfcee8b4689da266280a0
Changes ownership of ViewManager

From the docs:

Each call to OnEmbed() results in a new ViewManager and new root View.
ViewManager is deleted by any of the following:
. If the root of the connection is destroyed. This happens if the owner
  of the root Embed()s another app in root, or the owner explicitly deletes
  root.
. The connection to the viewmanager is lost.
. Explicitly by way of calling delete.

When the ViewManager is deleted all views are deleted (and observers
notified). This is followed by notifying the delegate by way of
OnViewManagerDisconnected().

BUG=none
TEST=none
R=ben@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#331888}
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/view.h
components/view_manager/public/cpp/view_manager.h
components/view_manager/public/cpp/view_manager_delegate.h
components/view_manager/view_manager_client_apptest.cc