| Index: chrome/browser/memory/tab_manager.cc
|
| diff --git a/chrome/browser/memory/tab_manager.cc b/chrome/browser/memory/tab_manager.cc
|
| index 17440aab115ac09dfb293350537c59fb1e03c055..3f9a83a9c706b55a0c4a59e5a14c0eba1dc5c0fa 100644
|
| --- a/chrome/browser/memory/tab_manager.cc
|
| +++ b/chrome/browser/memory/tab_manager.cc
|
| @@ -350,6 +350,19 @@ void TabManager::ActiveTabChanged(content::WebContents* old_contents,
|
| GetWebContentsData(old_contents)->SetLastInactiveTime(NowTicks());
|
| }
|
|
|
| +void TabManager::TabInsertedAt(content::WebContents* contents,
|
| + int index,
|
| + bool foreground) {
|
| + // Only interested in background tabs, as foreground tabs get taken care of by
|
| + // ActiveTabChanged.
|
| + if (foreground)
|
| + return;
|
| +
|
| + // A new background tab is similar to having a tab switch from being active to
|
| + // inactive.
|
| + GetWebContentsData(contents)->SetLastInactiveTime(NowTicks());
|
| +}
|
| +
|
| ///////////////////////////////////////////////////////////////////////////////
|
| // TabManager, private:
|
|
|
|
|