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

Unified Diff: chrome/browser/dom_ui/html_dialog_ui.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/html_dialog_ui.h ('k') | chrome/browser/dom_ui/new_tab_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/html_dialog_ui.cc
===================================================================
--- chrome/browser/dom_ui/html_dialog_ui.cc (revision 19317)
+++ chrome/browser/dom_ui/html_dialog_ui.cc (working copy)
@@ -61,11 +61,20 @@
// Pass the arguments to the renderer supplied by the delegate.
std::string dialog_args;
+ std::vector<DOMMessageHandler*> handlers;
HtmlDialogUIDelegate** delegate = GetPropertyAccessor().GetProperty(
tab_contents()->property_bag());
- if (delegate)
+ if (delegate) {
dialog_args = (*delegate)->GetDialogArgs();
+ (*delegate)->GetDOMMessageHandlers(&handlers);
+ }
+
render_view_host->SetDOMUIProperty("dialogArguments", dialog_args);
+ for (std::vector<DOMMessageHandler*>::iterator it = handlers.begin();
+ it != handlers.end(); ++it) {
+ (*it)->Attach(this);
+ AddMessageHandler(*it);
+ }
}
void HtmlDialogUI::OnDialogClosed(const Value* content) {
« no previous file with comments | « chrome/browser/dom_ui/html_dialog_ui.h ('k') | chrome/browser/dom_ui/new_tab_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698