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

Unified Diff: chrome/browser/dom_ui/tips_handler.cc

Issue 131094: Add GetMessageHandlers to HtmlDialogUIDelegate to allow... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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/dom_ui/tips_handler.h ('k') | chrome/browser/extensions/extensions_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/tips_handler.cc
===================================================================
--- chrome/browser/dom_ui/tips_handler.cc (revision 19317)
+++ chrome/browser/dom_ui/tips_handler.cc (working copy)
@@ -21,16 +21,17 @@
L"Tips and recommendations to help you discover interesting websites.";
}
-TipsHandler::TipsHandler(DOMUI* dom_ui)
- : DOMMessageHandler(dom_ui),
- dom_ui_(dom_ui) {
- dom_ui->RegisterMessageCallback("getTips",
- NewCallback(this, &TipsHandler::HandleGetTips));
-
+DOMMessageHandler* TipsHandler::Attach(DOMUI* dom_ui) {
tips_cache_ = dom_ui_->GetProfile()->GetPrefs()->
GetDictionary(prefs::kNTPTipsCache);
+ return DOMMessageHandler::Attach(dom_ui);
}
+void TipsHandler::RegisterMessages() {
+ dom_ui_->RegisterMessageCallback("getTips",
+ NewCallback(this, &TipsHandler::HandleGetTips));
+}
+
void TipsHandler::HandleGetTips(const Value* content) {
// List containing the tips to be displayed.
ListValue list_value;
« no previous file with comments | « chrome/browser/dom_ui/tips_handler.h ('k') | chrome/browser/extensions/extensions_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698