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

Unified Diff: chrome/renderer/searchbox/searchbox_extension.cc

Issue 2532103002: Add support for components/ntp_tiles in InstantService (Closed)
Patch Set: rebase Created 4 years 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/common/search/instant_types.cc ('k') | components/ntp_tiles/most_visited_sites.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/searchbox/searchbox_extension.cc
diff --git a/chrome/renderer/searchbox/searchbox_extension.cc b/chrome/renderer/searchbox/searchbox_extension.cc
index fe57fb31c84bb834d79efd47457ef2d545dc6a8d..d86f66ec9fa89c7f406a2f216fb2dbbec5720107 100644
--- a/chrome/renderer/searchbox/searchbox_extension.cc
+++ b/chrome/renderer/searchbox/searchbox_extension.cc
@@ -169,6 +169,7 @@ v8::Local<v8::Object> GenerateMostVisitedItem(
// Otherwise, we just create an array with the generated one.
if (!mv_item.thumbnail.spec().empty()) {
v8::Local<v8::Array> thumbs = v8::Array::New(isolate, 2);
+ // Note: The "thumb2" source captures a thumbnail on the next visit.
thumbs->Set(0, GenerateThumb2URL(isolate, mv_item.url.spec()));
thumbs->Set(1, UTF8ToV8String(isolate, mv_item.thumbnail.spec()));
obj->Set(v8::String::NewFromUtf8(isolate, "thumbnailUrls"), thumbs);
@@ -185,6 +186,9 @@ v8::Local<v8::Object> GenerateMostVisitedItem(
UTF8ToV8String(isolate, mv_item.favicon.spec()));
}
+ obj->Set(v8::String::NewFromUtf8(isolate, "tileSource"),
+ v8::Integer::New(isolate, static_cast<int>(mv_item.source)));
+
if (IsIconNTPEnabled()) {
// Update website http://www.chromium.org/embeddedsearch when we make this
// permanent.
« no previous file with comments | « chrome/common/search/instant_types.cc ('k') | components/ntp_tiles/most_visited_sites.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698