Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Issue 689833005: Add a way to kill apps without killing windows (Closed)

Created:
6 years, 1 month ago by hashimoto
Modified:
6 years, 1 month ago
Reviewers:
scheib
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, benwells, Mr4D (OOO till 08-26)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -32 lines) Patch
M extensions/browser/process_manager.h View 3 chunks +13 lines, -5 lines 0 comments Download
M extensions/browser/process_manager.cc View 1 2 7 chunks +100 lines, -27 lines 0 comments Download

Messages

Total messages: 16 (8 generated)
hashimoto
Hi Vincent, In an offline chat, we've discussed the idea to add a way to ...
6 years, 1 month ago (2014-10-31 06:01:50 UTC) #6
scheib
Thanks, this is a good patch and most comments are small nits, however I'm concerned ...
6 years, 1 month ago (2014-10-31 19:49:06 UTC) #7
hashimoto
https://codereview.chromium.org/689833005/diff/80001/extensions/browser/process_manager.cc File extensions/browser/process_manager.cc (right): https://codereview.chromium.org/689833005/diff/80001/extensions/browser/process_manager.cc#newcode195 extensions/browser/process_manager.cc:195: struct ProcessManager::ExtensionRenderViewData { On 2014/10/31 19:49:05, scheib wrote: > ...
6 years, 1 month ago (2014-11-03 16:02:26 UTC) #10
scheib
lgtm, though try bots find a compile error given the switch rewrite: e:\b\build\slave\win\build\src\extensions\browser\process_manager.cc(224) :error C2220: ...
6 years, 1 month ago (2014-11-03 17:48:28 UTC) #11
hashimoto
Fixed the win compile error by adding return false with NOTREACHED(). https://codereview.chromium.org/689833005/diff/80001/extensions/browser/process_manager.cc File extensions/browser/process_manager.cc (right): ...
6 years, 1 month ago (2014-11-04 05:47:34 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/689833005/150001
6 years, 1 month ago (2014-11-04 05:48:34 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:150001)
6 years, 1 month ago (2014-11-04 07:35:25 UTC) #15
commit-bot: I haz the power
6 years, 1 month ago (2014-11-04 07:36:08 UTC) #16
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/5bca2278b8ecb8ae3b933807d3cb9a207616127c
Cr-Commit-Position: refs/heads/master@{#302584}

Powered by Google App Engine
This is Rietveld 408576698