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

Issue 2868983003: Ensure History > Recent Tabs restore preserves window disposition. (Closed)

Created:
3 years, 7 months ago by chrisha
Modified:
3 years, 4 months ago
Reviewers:
sky, sdefresne
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure History > Recent Tabs restore preserves window disposition. This plumbs the window bounds, show state and workspace through the tab restore stack. This ensure that "Window" entries are restored with their previous window parameters. This is being submitted with NOPRESUBMIT, because the code uses a deprecated API (Time::To/FromInternal). Unfortunately, it can't be updated to not use it as their exists user data with these values. The code isn't "new", simply refactored. BUG=718042 NOPRESUBMIT=true Review-Url: https://codereview.chromium.org/2868983003 Cr-Commit-Position: refs/heads/master@{#495707} Committed: https://chromium.googlesource.com/chromium/src/+/b1ba090f0f5fa59c98bd4d8b5c17d6ae7192c749

Patch Set 1 #

Patch Set 2 : Fix single-tab window issues. #

Patch Set 3 : Small cleanup. #

Total comments: 12

Patch Set 4 : Address sky's comments on patch set 3. #

Patch Set 5 : Remove single-tab-window special case logic for now. #

Patch Set 6 : Cleanup. #

Patch Set 7 : Fix iOS and Android. #

Patch Set 8 : More iOS fixes. #

Total comments: 15

Patch Set 9 : Add window information to persistent session storage. #

Patch Set 10 : Remove accidentally added file. #

Patch Set 11 : Remove spurious build config change. #

Patch Set 12 : Add unittest of persistent tab restore service. #

Patch Set 13 : Minor cleanup. #

Total comments: 24

Patch Set 14 : Add a browser test. #

Patch Set 15 : Small fix to WindowCommandFields. #

Total comments: 14

Patch Set 16 : Address sky's comments on PS15. #

Total comments: 4

Patch Set 17 : Address nits. #

Patch Set 18 : Fix stale header files. #

Patch Set 19 : Fix broken unittest. #

Patch Set 20 : Fix unittest. #

Patch Set 21 : Remove NOTREACHED(). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+535 lines, -90 lines) Patch
M chrome/browser/sessions/chrome_tab_restore_service_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/sessions/chrome_tab_restore_service_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/sessions/persistent_tab_restore_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +71 lines, -11 lines 0 comments Download
M chrome/browser/sessions/tab_restore_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +64 lines, -0 lines 0 comments Download
M chrome/browser/ui/android/tab_model/android_live_tab_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/android/tab_model/android_live_tab_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 16 17 18 19 20 2 chunks +17 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser_live_tab_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +14 lines, -3 lines 0 comments Download
M chrome/browser/ui/browser_live_tab_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +28 lines, -9 lines 0 comments Download
M chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M components/sessions/core/live_tab_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -0 lines 0 comments Download
M components/sessions/core/persistent_tab_restore_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 9 chunks +256 lines, -50 lines 0 comments Download
M components/sessions/core/tab_restore_service.h View 2 chunks +7 lines, -0 lines 0 comments Download
M components/sessions/core/tab_restore_service_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +10 lines, -1 line 0 comments Download
M components/sessions/core/tab_restore_service_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +16 lines, -9 lines 0 comments Download
M ios/chrome/browser/sessions/ios_chrome_tab_restore_service_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -1 line 0 comments Download
M ios/chrome/browser/sessions/ios_chrome_tab_restore_service_client.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -1 line 0 comments Download
M ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -0 lines 0 comments Download
M ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 72 (48 generated)
chrisha
sky, PTAL? I made an executive decision about how to fix the "single-tab window" case, ...
3 years, 7 months ago (2017-05-08 22:04:40 UTC) #4
sky
https://codereview.chromium.org/2868983003/diff/40001/chrome/browser/ui/browser_live_tab_context.cc File chrome/browser/ui/browser_live_tab_context.cc (right): https://codereview.chromium.org/2868983003/diff/40001/chrome/browser/ui/browser_live_tab_context.cc#newcode61 chrome/browser/ui/browser_live_tab_context.cc:61: auto* window = browser_->window(); Please don't use auto* here. ...
3 years, 7 months ago (2017-05-08 22:51:36 UTC) #8
chrisha
Regarding the closing window vs closing tab discussion, I've moved that to the bug. Would ...
3 years, 7 months ago (2017-05-09 14:59:31 UTC) #9
chrisha
https://codereview.chromium.org/2868983003/diff/40001/chrome/browser/ui/browser_live_tab_context.cc File chrome/browser/ui/browser_live_tab_context.cc (right): https://codereview.chromium.org/2868983003/diff/40001/chrome/browser/ui/browser_live_tab_context.cc#newcode61 chrome/browser/ui/browser_live_tab_context.cc:61: auto* window = browser_->window(); On 2017/05/08 22:51:35, sky wrote: ...
3 years, 7 months ago (2017-05-09 15:44:55 UTC) #10
chrisha
sky: I've removed any UI modification and simply focused on restoring window dimensions. I'll move ...
3 years, 7 months ago (2017-05-11 17:24:27 UTC) #25
sky
https://codereview.chromium.org/2868983003/diff/130001/chrome/browser/ui/android/tab_model/android_live_tab_context.cc File chrome/browser/ui/android/tab_model/android_live_tab_context.cc (right): https://codereview.chromium.org/2868983003/diff/130001/chrome/browser/ui/android/tab_model/android_live_tab_context.cc#newcode62 chrome/browser/ui/android/tab_model/android_live_tab_context.cc:62: // Not supported by android. supported->applicable to? https://codereview.chromium.org/2868983003/diff/130001/chrome/browser/ui/android/tab_model/android_live_tab_context.cc#newcode74 chrome/browser/ui/android/tab_model/android_live_tab_context.cc:74: ...
3 years, 7 months ago (2017-05-12 02:42:07 UTC) #30
sdefresne
ios lgtm https://codereview.chromium.org/2868983003/diff/130001/ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.mm File ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.mm (right): https://codereview.chromium.org/2868983003/diff/130001/ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.mm#newcode86 ios/chrome/browser/sessions/tab_restore_service_delegate_impl_ios.mm:86: return ""; return std::string();
3 years, 7 months ago (2017-05-15 15:59:55 UTC) #31
sdefresne
chrisha: ping?
3 years, 6 months ago (2017-06-15 09:41:58 UTC) #32
chrisha
On 2017/06/15 09:41:58, sdefresne wrote: > chrisha: ping? Was traveling 3 of last 4 weeks, ...
3 years, 6 months ago (2017-06-15 19:34:34 UTC) #33
chrisha
*Finally* another round on this. Working on unittests. sky@, can you recommend another reviewer while ...
3 years, 5 months ago (2017-06-28 18:30:42 UTC) #34
sky
On 2017/06/28 18:30:42, chrisha wrote: > *Finally* another round on this. Working on unittests. > ...
3 years, 5 months ago (2017-06-28 20:06:56 UTC) #35
chrisha
Now with a unittest, working on a browsertest. sky: Feel free to take a look ...
3 years, 5 months ago (2017-06-28 21:25:28 UTC) #36
sky
https://codereview.chromium.org/2868983003/diff/230001/chrome/browser/sessions/chrome_tab_restore_service_client.h File chrome/browser/sessions/chrome_tab_restore_service_client.h (right): https://codereview.chromium.org/2868983003/diff/230001/chrome/browser/sessions/chrome_tab_restore_service_client.h#newcode10 chrome/browser/sessions/chrome_tab_restore_service_client.h:10: #include "ui/base/ui_base_types.h" These includes (or forward declarations) should be ...
3 years, 5 months ago (2017-06-28 22:38:01 UTC) #37
chrisha
Addressed all of sky's nits, and added a new browser test. brettw: sky mentioned you ...
3 years, 5 months ago (2017-06-30 15:42:13 UTC) #39
sky
https://codereview.chromium.org/2868983003/diff/270001/chrome/browser/ui/android/tab_model/android_live_tab_context.cc File chrome/browser/ui/android/tab_model/android_live_tab_context.cc (right): https://codereview.chromium.org/2868983003/diff/270001/chrome/browser/ui/android/tab_model/android_live_tab_context.cc#newcode58 chrome/browser/ui/android/tab_model/android_live_tab_context.cc:58: // Not applicable to android. I like this better ...
3 years, 5 months ago (2017-07-11 20:28:09 UTC) #40
chrisha
Yet another round. I think this is now officially the "longest" CL I've had! :) ...
3 years, 4 months ago (2017-08-14 14:43:21 UTC) #42
sky
LGTM https://codereview.chromium.org/2868983003/diff/290001/components/sessions/core/persistent_tab_restore_service.cc File components/sessions/core/persistent_tab_restore_service.cc (right): https://codereview.chromium.org/2868983003/diff/290001/components/sessions/core/persistent_tab_restore_service.cc#newcode145 components/sessions/core/persistent_tab_restore_service.cc:145: SERIALIZED_SHOW_STATE_INVALID = -1, Latest style is kCamelCase. https://codereview.chromium.org/2868983003/diff/290001/components/sessions/core/persistent_tab_restore_service.cc#newcode174 ...
3 years, 4 months ago (2017-08-14 16:43:52 UTC) #43
chrisha
Thanks for the thorough reviews! https://codereview.chromium.org/2868983003/diff/290001/components/sessions/core/persistent_tab_restore_service.cc File components/sessions/core/persistent_tab_restore_service.cc (right): https://codereview.chromium.org/2868983003/diff/290001/components/sessions/core/persistent_tab_restore_service.cc#newcode145 components/sessions/core/persistent_tab_restore_service.cc:145: SERIALIZED_SHOW_STATE_INVALID = -1, On ...
3 years, 4 months ago (2017-08-14 17:22:34 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2868983003/370001
3 years, 4 months ago (2017-08-15 13:57:49 UTC) #60
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/362688)
3 years, 4 months ago (2017-08-15 15:20:40 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2868983003/370001
3 years, 4 months ago (2017-08-17 21:18:32 UTC) #64
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/365377)
3 years, 4 months ago (2017-08-17 22:48:43 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2868983003/390001
3 years, 4 months ago (2017-08-18 20:58:21 UTC) #69
commit-bot: I haz the power
3 years, 4 months ago (2017-08-18 22:01:18 UTC) #72
Message was sent while issue was closed.
Committed patchset #21 (id:390001) as
https://chromium.googlesource.com/chromium/src/+/b1ba090f0f5fa59c98bd4d8b5c17...

Powered by Google App Engine
This is Rietveld 408576698