| Index: chrome/browser/debugger/browser_list_tabcontents_provider.cc
|
| diff --git a/chrome/browser/debugger/browser_list_tabcontents_provider.cc b/chrome/browser/debugger/browser_list_tabcontents_provider.cc
|
| index f29c647c7f1d0530ae0f1cf3b6fe0ab58b528c2f..f8639b62c1ba0e9e43c1b8bcfbc4ad2779152d61 100644
|
| --- a/chrome/browser/debugger/browser_list_tabcontents_provider.cc
|
| +++ b/chrome/browser/debugger/browser_list_tabcontents_provider.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "chrome/browser/history/top_sites.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/profiles/profile_manager.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_list.h"
|
| #include "content/public/browser/browser_thread.h"
|
| @@ -55,3 +56,20 @@ bool BrowserListTabContentsProvider::BundlesFrontendResources() {
|
| std::string BrowserListTabContentsProvider::GetFrontendResourcesBaseURL() {
|
| return "chrome-devtools://devtools/";
|
| }
|
| +
|
| +std::string BrowserListTabContentsProvider::GetPageThumbnailData(
|
| + const GURL& url) {
|
| + for (BrowserList::const_iterator it = BrowserList::begin(),
|
| + end = BrowserList::end(); it != end; ++it) {
|
| + Profile* profile = (*it)->profile();
|
| + history::TopSites* top_sites = profile->GetTopSites();
|
| + if (!top_sites)
|
| + continue;
|
| + scoped_refptr<base::RefCountedMemory> data;
|
| + if (top_sites->GetPageThumbnail(url, &data))
|
| + return std::string(
|
| + reinterpret_cast<const char*>(data->front()), data->size());
|
| + }
|
| +
|
| + return std::string();
|
| +}
|
|
|