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

Unified Diff: chrome/browser/ui/webui/ntp/favicon_webui_handler.cc

Issue 7610014: [ntp4] Bookmarks page implementation, first-pass. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Final review tweaks, rebase. Created 9 years, 4 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/ui/webui/ntp/favicon_webui_handler.cc
===================================================================
--- chrome/browser/ui/webui/ntp/favicon_webui_handler.cc (revision 96850)
+++ chrome/browser/ui/webui/ntp/favicon_webui_handler.cc (working copy)
@@ -35,6 +35,10 @@
double id;
CHECK(args->GetDouble(1, &id));
+ std::string callback_name;
+ CHECK(args->GetString(2, &callback_name));
+ callbacks_map_[static_cast<int>(id)] = callback_name;
+
FaviconService* favicon_service =
Profile::FromWebUI(web_ui_)->GetFaviconService(Profile::EXPLICIT_ACCESS);
if (!favicon_service || path.empty())
@@ -72,6 +76,6 @@
color_value.reset(new StringValue("#919191"));
}
- web_ui_->CallJavascriptFunction("ntp4.setFaviconDominantColor",
- id_value, *color_value);
+ web_ui_->CallJavascriptFunction(callbacks_map_[id], id_value, *color_value);
+ callbacks_map_.erase(id);
}

Powered by Google App Engine
This is Rietveld 408576698