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

Unified Diff: chrome/browser/task_manager/task_manager_resource_providers.cc

Issue 9015022: Replace most of Browser::GetSelectedTabContents calls into Browser::GetSelectedWebContents. I've ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/tabs/tab_finder.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager/task_manager_resource_providers.cc
===================================================================
--- chrome/browser/task_manager/task_manager_resource_providers.cc (revision 116109)
+++ chrome/browser/task_manager/task_manager_resource_providers.cc (working copy)
@@ -388,7 +388,7 @@
// Then we register for notifications to get new tabs.
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
content::NotificationService::AllBrowserContextsAndSources());
- registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_SWAPPED,
+ registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_SWAPPED,
content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED,
content::NotificationService::AllBrowserContextsAndSources());
@@ -411,7 +411,7 @@
this, content::NOTIFICATION_TAB_CONTENTS_CONNECTED,
content::NotificationService::AllBrowserContextsAndSources());
registrar_.Remove(
- this, content::NOTIFICATION_TAB_CONTENTS_SWAPPED,
+ this, content::NOTIFICATION_WEB_CONTENTS_SWAPPED,
content::NotificationService::AllBrowserContextsAndSources());
registrar_.Remove(
this, content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED,
@@ -500,7 +500,8 @@
TabContentsWrapper* tab_contents;
if (type == chrome::NOTIFICATION_INSTANT_COMMITTED) {
tab_contents = content::Source<TabContentsWrapper>(source).ptr();
- } else if (type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED) {
+ } else if (type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED ||
+ type == content::NOTIFICATION_WEB_CONTENTS_SWAPPED) {
WebContents* web_contents = content::Source<WebContents>(source).ptr();
tab_contents = TabContentsWrapper::GetCurrentWrapperForContents(
web_contents);
@@ -515,7 +516,7 @@
case content::NOTIFICATION_TAB_CONTENTS_CONNECTED:
Add(tab_contents);
break;
- case content::NOTIFICATION_TAB_CONTENTS_SWAPPED:
+ case content::NOTIFICATION_WEB_CONTENTS_SWAPPED:
Remove(tab_contents);
Add(tab_contents);
break;
« no previous file with comments | « chrome/browser/tabs/tab_finder.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698