Index: trunk/src/chrome/browser/task_manager/tab_contents_resource_provider.cc |
=================================================================== |
--- trunk/src/chrome/browser/task_manager/tab_contents_resource_provider.cc (revision 244428) |
+++ trunk/src/chrome/browser/task_manager/tab_contents_resource_provider.cc (working copy) |
@@ -13,6 +13,8 @@ |
#include "chrome/browser/prerender/prerender_manager_factory.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/profiles/profile_manager.h" |
+#include "chrome/browser/search/instant_service.h" |
+#include "chrome/browser/search/instant_service_factory.h" |
#include "chrome/browser/search/search.h" |
#include "chrome/browser/tab_contents/tab_util.h" |
#include "chrome/browser/task_manager/renderer_resource.h" |
@@ -87,6 +89,7 @@ |
static gfx::ImageSkia* prerender_icon_; |
content::WebContents* web_contents_; |
Profile* profile_; |
+ bool is_instant_ntp_; |
DISALLOW_COPY_AND_ASSIGN(TabContentsResource); |
}; |
@@ -98,7 +101,8 @@ |
: RendererResource(web_contents->GetRenderProcessHost()->GetHandle(), |
web_contents->GetRenderViewHost()), |
web_contents_(web_contents), |
- profile_(Profile::FromBrowserContext(web_contents->GetBrowserContext())) { |
+ profile_(Profile::FromBrowserContext(web_contents->GetBrowserContext())), |
+ is_instant_ntp_(chrome::IsPreloadedInstantExtendedNTP(web_contents)) { |
if (!prerender_icon_) { |
ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
prerender_icon_ = rb.GetImageSkiaNamed(IDR_PRERENDER); |
@@ -134,6 +138,7 @@ |
HostsExtension(), |
profile_->IsOffTheRecord(), |
IsContentsPrerendering(web_contents_), |
+ is_instant_ntp_, |
false); // is_background |
return l10n_util::GetStringFUTF16(message_id, tab_title); |
} |
@@ -232,6 +237,14 @@ |
} |
} |
+ // Add all the Instant Extended prerendered NTPs. |
+ for (size_t i = 0; i < profiles.size(); ++i) { |
+ const InstantService* instant_service = |
+ InstantServiceFactory::GetForProfile(profiles[i]); |
+ if (instant_service && instant_service->GetNTPContents()) |
+ Add(instant_service->GetNTPContents()); |
+ } |
+ |
#if defined(ENABLE_FULL_PRINTING) |
// Add all the pages being background printed. |
printing::BackgroundPrintingManager* printing_manager = |
@@ -287,6 +300,7 @@ |
// pages, prerender pages, and background printed pages. |
if (!chrome::FindBrowserWithWebContents(web_contents) && |
!IsContentsPrerendering(web_contents) && |
+ !chrome::IsPreloadedInstantExtendedNTP(web_contents) && |
!IsContentsBackgroundPrinted(web_contents) && |
!DevToolsWindow::IsDevToolsWindow(web_contents->GetRenderViewHost())) { |
return; |