[go: nahoru, domu]

Add resource_coordinator::LifecycleUnitSourceObserver.

LifecycleUnitSourceObserver is an interface to be notified when LifecycleUnits
are created and destroyed. This interface will be implemented by TabManager (to
be renamed to LifecycleManager).

For LifecycleUnit discarding, TabManager could have polled information about
LifecycleUnits when needed instead of receiving notifications via a
LifecycleUnitSourceObserver interface. However, once background tab loading
starts using LifecycleUnits, TabManager will have to react to some LifecycleUnit
events (e.g. start loading another LifecycleUnit when a LifecycleUnit finishes
to load). We prefer having the push interface right away.

Bug: 775644
Change-Id: I943452b2b903fc012084618805b17d1fd82ab73c
Reviewed-on: https://chromium-review.googlesource.com/779744
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519156}
2 files changed