| Index: chrome/browser/ui/android/tab_model/tab_model.cc
|
| diff --git a/chrome/browser/ui/android/tab_model/tab_model.cc b/chrome/browser/ui/android/tab_model/tab_model.cc
|
| index 2d5bd6a04f043705bbcf52b55161a7cb80fd45f0..1c07f779d9e4f3789fdb96c896be893b6551c241 100644
|
| --- a/chrome/browser/ui/android/tab_model/tab_model.cc
|
| +++ b/chrome/browser/ui/android/tab_model/tab_model.cc
|
| @@ -14,6 +14,10 @@
|
|
|
| using content::NotificationService;
|
|
|
| +// Keep this in sync with
|
| +// chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabList.java
|
| +static int INVALID_TAB_INDEX = -1;
|
| +
|
| TabModel::TabModel(Profile* profile)
|
| : profile_(profile),
|
| synced_window_delegate_(
|
| @@ -58,6 +62,13 @@ SessionID::id_type TabModel::GetSessionId() const {
|
| return session_id_.id();
|
| }
|
|
|
| +content::WebContents* TabModel::GetActiveWebContents() const {
|
| + int active_index = GetActiveIndex();
|
| + if (active_index == INVALID_TAB_INDEX)
|
| + return nullptr;
|
| + return GetWebContentsAt(active_index);
|
| +}
|
| +
|
| void TabModel::BroadcastSessionRestoreComplete() {
|
| if (profile_) {
|
| NotificationService::current()->Notify(
|
|
|