Abstract WebContents/NavigationController from core TabRestore code
commit80c5b2a0321d38d4af5761c7078c8972828eaa31
authorblundell <blundell@chromium.org>
Thu, 17 Sep 2015 18:22:12 +0000 (17 11:22 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 17 Sep 2015 18:23:48 +0000 (17 18:23 +0000)
treefec45bd1d9aef1096815fbe1303b7525884944d5
parent63d33faa5db0899388d75f7bd4007e56d59c83c6
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

Review URL: https://codereview.chromium.org/1321713005

Cr-Commit-Position: refs/heads/master@{#349454}
25 files changed:
chrome/browser/android/tab_android.cc
chrome/browser/extensions/api/sessions/sessions_api.cc
chrome/browser/sessions/chrome_tab_restore_service_client.cc
chrome/browser/sessions/chrome_tab_restore_service_client.h
chrome/browser/sessions/in_memory_tab_restore_service.cc
chrome/browser/sessions/in_memory_tab_restore_service.h
chrome/browser/sessions/persistent_tab_restore_service.cc
chrome/browser/sessions/persistent_tab_restore_service.h
chrome/browser/sessions/persistent_tab_restore_service_unittest.cc
chrome/browser/sessions/session_restore_browsertest.cc
chrome/browser/sessions/tab_restore_service.h
chrome/browser/sessions/tab_restore_service_delegate.h
chrome/browser/sessions/tab_restore_service_helper.cc
chrome/browser/sessions/tab_restore_service_helper.h
chrome/browser/ui/browser_tab_restore_service_delegate.cc
chrome/browser/ui/browser_tab_restore_service_delegate.h
chrome/browser/ui/browser_tab_strip_model_delegate.cc
chrome/browser/ui/tab_helpers.cc
components/sessions.gypi
components/sessions/BUILD.gn
components/sessions/content/content_live_tab.cc [new file with mode: 0644]
components/sessions/content/content_live_tab.h [new file with mode: 0644]
components/sessions/core/live_tab.h [new file with mode: 0644]
components/sessions/core/tab_restore_service_client.cc
components/sessions/core/tab_restore_service_client.h