DescriptionAdd a way to kill apps without killing windows
This change allows apps to remember the app state when handling onSuspend event.
Add a new method ProcessManager::ReleaseLazyKeepaliveCountForView to decrement the lazy keepalive count without killing AppWindow.
Rename ProcessManager::IncrementLazyKeepaliveCountForView to AcquireLazyKeepaliveCountForView.
Close remaining views in CloseLazyBackgroundPageNow().
Before this change, things happen in this order:
1. All AppWindows are destroyed
2. Keepalive count becomes 0
3. chrome.runtime.onSuspend is invoked
4. The background page is unloaded.
After this change:
1. All AppWindows have released keepalive. (by explicitly releasing it or being destroyed)
2. Keepalive count becomes 0
3. chrome.runtime.onSuspend is invoked
4. Remaining AppWindows are destroyed
5. The background page is unloaded.
BUG=416999
Committed: https://crrev.com/5bca2278b8ecb8ae3b933807d3cb9a207616127c
Cr-Commit-Position: refs/heads/master@{#302584}
Patch Set 1 : #
Total comments: 10
Patch Set 2 : Address comments #Patch Set 3 : Fix Win compile #
Messages
Total messages: 16 (8 generated)
|