Index: chrome/browser/android/devtools_server.cc |
diff --git a/chrome/browser/android/devtools_server.cc b/chrome/browser/android/devtools_server.cc |
index e1649a362691595618befa5aa06e1230952422fc..e240885bc9ca8aef5a45d084c510baec1fb39ce9 100644 |
--- a/chrome/browser/android/devtools_server.cc |
+++ b/chrome/browser/android/devtools_server.cc |
@@ -57,6 +57,19 @@ class DevToolsServerDelegate : public content::DevToolsHttpHandlerDelegate { |
return ""; |
} |
+ virtual std::string GetPageThumbnailData(const GURL& url) { |
+ Profile* profile = |
+ ProfileManager::GetLastUsedProfile()->GetOriginalProfile(); |
+ history::TopSites* top_sites = profile->GetTopSites(); |
+ if (top_sites) { |
+ scoped_refptr<base::RefCountedMemory> data; |
+ if (top_sites->GetPageThumbnail(url, &data)) |
+ return std::string(reinterpret_cast<const char*>(data->front()), |
+ data->size()); |
+ } |
+ return ""; |
+ } |
+ |
private: |
static void PopulatePageThumbnails() { |
Profile* profile = |