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

Unified Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 6246007: Generate thumbnails in the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the function name... Created 9 years, 11 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
Index: chrome/browser/tab_contents/tab_contents.cc
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index bfd1a409a7a6624dcfb42133386a6988f6321aae..de2801c42d62de7c21a379bb5ea7f543f0cbb4c2 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -75,6 +75,7 @@
#include "chrome/browser/tab_contents/tab_contents_delegate.h"
#include "chrome/browser/tab_contents/tab_contents_ssl_helper.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
+#include "chrome/browser/tab_contents/thumbnail_generator.h"
#include "chrome/browser/tab_contents/web_navigation_observer.h"
#include "chrome/browser/translate/page_translated_details.h"
#include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h"
@@ -2378,6 +2379,12 @@ void TabContents::OnPageContents(const GURL& url,
NotificationType::TAB_LANGUAGE_DETERMINED,
Source<TabContents>(this),
Details<std::string>(&lang));
+
+ // Generate the thumbnail here if the in-browser thumbnailing is enabled.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableInBrowserThumbnailing)) {
+ ThumbnailGenerator::UpdateThumbnailIfNecessary(this, url);
+ }
}
void TabContents::OnPageTranslated(int32 page_id,
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host.cc ('k') | chrome/browser/tab_contents/thumbnail_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698