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

Unified Diff: chrome/browser/views/tabs/tab_overview_controller.cc

Issue 144006: Add Linux support for getting the thumbnail and wire into the switcher. (Closed)
Patch Set: For checkin Created 11 years, 6 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/views/tabs/tab_overview_cell.cc ('k') | views/controls/image_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/tab_overview_controller.cc
diff --git a/chrome/browser/views/tabs/tab_overview_controller.cc b/chrome/browser/views/tabs/tab_overview_controller.cc
index 86456c1e9582fc4aa041d5d5bb06f7d4134ccac7..fb7dfa4bb84e3a683c3e3be53ad0583db3985a26 100644
--- a/chrome/browser/views/tabs/tab_overview_controller.cc
+++ b/chrome/browser/views/tabs/tab_overview_controller.cc
@@ -5,8 +5,10 @@
#include "chrome/browser/views/tabs/tab_overview_controller.h"
#include "chrome/browser/browser.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/gtk/browser_window_gtk.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#include "chrome/browser/tab_contents/thumbnail_generator.h"
#include "chrome/browser/views/tabs/tab_overview_cell.h"
#include "chrome/browser/views/tabs/tab_overview_container.h"
#include "chrome/browser/views/tabs/tab_overview_grid.h"
@@ -107,10 +109,14 @@ void TabOverviewController::Show() {
void TabOverviewController::ConfigureCell(TabOverviewCell* cell,
TabContents* contents) {
- // TODO: need to set thumbnail here.
if (contents) {
cell->SetTitle(contents->GetTitle());
cell->SetFavIcon(contents->GetFavIcon());
+
+ ThumbnailGenerator* generator = g_browser_process->GetThumbnailGenerator();
+ cell->SetThumbnail(
+ generator->GetThumbnailForRenderer(contents->render_view_host()));
+
cell->SchedulePaint();
} else {
// Need to figure out under what circumstances this is null and deal.
« no previous file with comments | « chrome/browser/views/tabs/tab_overview_cell.cc ('k') | views/controls/image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698