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

Issue 1321713005: Abstract WebContents/NavigationController from core TabRestore code (Closed)

Created:
5 years, 3 months ago by blundell
Modified:
5 years, 3 months ago
Reviewers:
Avi (use Gerrit), sky
CC:
chromium-reviews, extensions-reviews_chromium.org, jennb, sadrul, dzhioev+watch_chromium.org, achuith+watch_chromium.org, Dmitry Titov, dcheng, jianli, oshima+watch_chromium.org, kalyank, chromium-apps-reviews_chromium.org, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Abstract WebContents/NavigationController from core TabRestore code As the final piece of eliminating //content dependencies from core TabRestore code to enable clean integration with iOS, this CL eliminates that code's knowledge of WebContents and NavigationController. To do so, it introduces an LiveTab interface that is an abstract representation of an open tab from the tab restore POV. It also introduces a ContentLiveTab implementation that is backed by WebContents and used by //chrome. Core TabRestore code is moved from talking to WebContents/NavigationController to talking to LiveTab. //chrome usage of this core code is changed to convert back and forth between a (Content)LiveTab and WebContents as necessary, using the fact that ContentLiveTab is a WebContentsUserData with a web_contents() accessor. BUG=530174 Committed: https://crrev.com/80c5b2a0321d38d4af5761c7078c8972828eaa31 Cr-Commit-Position: refs/heads/master@{#349454}

Patch Set 1 #

Patch Set 2 : Further work #

Patch Set 3 : Rebase #

Patch Set 4 : Fixes to GN and SESSION_EXPORT #

Patch Set 5 : Introduce hierarchy and rename #

Patch Set 6 : Self-review #

Patch Set 7 : Self-review #

Patch Set 8 : Fix #

Total comments: 11

Patch Set 9 : Rebase #

Patch Set 10 : Response to review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+372 lines, -195 lines) Patch
M chrome/browser/android/tab_android.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/sessions/sessions_api.cc View 1 2 3 4 5 6 7 8 9 3 chunks +18 lines, -14 lines 0 comments Download
M chrome/browser/sessions/chrome_tab_restore_service_client.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -6 lines 0 comments Download
M chrome/browser/sessions/chrome_tab_restore_service_client.cc View 1 2 3 4 5 6 7 8 9 4 chunks +12 lines, -9 lines 0 comments Download
M chrome/browser/sessions/in_memory_tab_restore_service.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/sessions/in_memory_tab_restore_service.cc View 1 2 3 4 5 6 7 8 9 4 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/sessions/persistent_tab_restore_service.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/sessions/persistent_tab_restore_service.cc View 1 2 3 4 5 6 7 8 9 4 chunks +7 lines, -8 lines 0 comments Download
M chrome/browser/sessions/persistent_tab_restore_service_unittest.cc View 1 2 3 4 5 6 7 8 9 17 chunks +19 lines, -14 lines 0 comments Download
M chrome/browser/sessions/session_restore_browsertest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -4 lines 0 comments Download
M chrome/browser/sessions/tab_restore_service.h View 1 2 3 4 5 6 7 8 9 4 chunks +8 lines, -9 lines 0 comments Download
M chrome/browser/sessions/tab_restore_service_delegate.h View 1 2 3 4 5 6 7 8 9 3 chunks +6 lines, -8 lines 0 comments Download
M chrome/browser/sessions/tab_restore_service_helper.h View 1 2 3 4 5 6 7 8 9 4 chunks +8 lines, -13 lines 0 comments Download
M chrome/browser/sessions/tab_restore_service_helper.cc View 1 2 3 4 5 6 7 8 9 14 chunks +44 lines, -57 lines 0 comments Download
M chrome/browser/ui/browser_tab_restore_service_delegate.h View 1 2 3 4 5 6 7 8 9 3 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/ui/browser_tab_restore_service_delegate.cc View 1 2 3 4 5 6 7 8 9 5 chunks +22 lines, -14 lines 0 comments Download
M chrome/browser/ui/browser_tab_strip_model_delegate.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/tab_helpers.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M components/sessions.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M components/sessions/BUILD.gn View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
A components/sessions/content/content_live_tab.h View 1 2 3 4 5 6 7 8 9 1 chunk +67 lines, -0 lines 0 comments Download
A components/sessions/content/content_live_tab.cc View 1 2 3 4 5 6 7 8 9 1 chunk +65 lines, -0 lines 0 comments Download
A components/sessions/core/live_tab.h View 1 2 3 4 5 6 7 8 9 1 chunk +39 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 3 chunks +7 lines, -17 lines 0 comments Download
M components/sessions/core/tab_restore_service_client.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 19 (6 generated)
blundell
Hi Scott, The core pieces of this CL are: 1. The introduction of OpenTab and ...
5 years, 3 months ago (2015-09-16 16:20:36 UTC) #2
sky
https://codereview.chromium.org/1321713005/diff/140001/chrome/browser/ui/panels/panel_host.cc File chrome/browser/ui/panels/panel_host.cc (right): https://codereview.chromium.org/1321713005/diff/140001/chrome/browser/ui/panels/panel_host.cc#newcode70 chrome/browser/ui/panels/panel_host.cc:70: sessions::ContentOpenTab::CreateForWebContents(web_contents_.get()); It would be nice not to have to ...
5 years, 3 months ago (2015-09-16 20:04:53 UTC) #3
blundell
Hi Avi, Could you comment on the comment that sky@ left on panel_host.cc re: the ...
5 years, 3 months ago (2015-09-16 20:19:42 UTC) #5
sky
To be clear I'm not asking to change the policy of WebContentsUserData. Rather ContentOpenTab has ...
5 years, 3 months ago (2015-09-16 20:48:16 UTC) #6
blundell
On 2015/09/16 20:48:16, sky wrote: > To be clear I'm not asking to change the ...
5 years, 3 months ago (2015-09-16 20:58:45 UTC) #7
blundell
On 2015/09/16 20:58:45, blundell wrote: > On 2015/09/16 20:48:16, sky wrote: > > To be ...
5 years, 3 months ago (2015-09-17 09:40:29 UTC) #8
blundell
Ready for re-review https://codereview.chromium.org/1321713005/diff/140001/chrome/browser/ui/panels/panel_host.cc File chrome/browser/ui/panels/panel_host.cc (right): https://codereview.chromium.org/1321713005/diff/140001/chrome/browser/ui/panels/panel_host.cc#newcode70 chrome/browser/ui/panels/panel_host.cc:70: sessions::ContentOpenTab::CreateForWebContents(web_contents_.get()); On 2015/09/16 20:19:42, blundell wrote: ...
5 years, 3 months ago (2015-09-17 11:52:25 UTC) #12
Avi (use Gerrit)
Comments: - It's completely OK to not use WCUD and to fall back to UserData ...
5 years, 3 months ago (2015-09-17 15:08:25 UTC) #13
blundell
On 2015/09/17 15:08:25, Avi wrote: > Comments: > > - It's completely OK to not ...
5 years, 3 months ago (2015-09-17 15:32:03 UTC) #14
sky
LGTM
5 years, 3 months ago (2015-09-17 16:51:10 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1321713005/230001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1321713005/230001
5 years, 3 months ago (2015-09-17 18:16:15 UTC) #17
commit-bot: I haz the power
Committed patchset #10 (id:230001)
5 years, 3 months ago (2015-09-17 18:22:19 UTC) #18
commit-bot: I haz the power
5 years, 3 months ago (2015-09-17 18:24:00 UTC) #19
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/80c5b2a0321d38d4af5761c7078c8972828eaa31
Cr-Commit-Position: refs/heads/master@{#349454}

Powered by Google App Engine
This is Rietveld 408576698