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

Unified Diff: chrome/browser/ui/webui/constrained_web_dialog_ui.cc

Issue 614683002: Fix a DCHECK failure by registering a handler for 'dialogClose' message. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/constrained_web_dialog_ui.cc
diff --git a/chrome/browser/ui/webui/constrained_web_dialog_ui.cc b/chrome/browser/ui/webui/constrained_web_dialog_ui.cc
index c517ae74f4b3b6274edbc7cbbb1f1632af603846..b183a823aab636a109f05b1625659496c067e2bb 100644
--- a/chrome/browser/ui/webui/constrained_web_dialog_ui.cc
+++ b/chrome/browser/ui/webui/constrained_web_dialog_ui.cc
@@ -60,6 +60,11 @@ ConstrainedWebDialogUI::~ConstrainedWebDialogUI() {
void ConstrainedWebDialogUI::RenderViewCreated(
RenderViewHost* render_view_host) {
+ // Add a "dialogClose" callback which matches WebDialogUI behavior.
+ web_ui()->RegisterMessageCallback("dialogClose",
+ base::Bind(&ConstrainedWebDialogUI::OnDialogCloseMessage,
+ base::Unretained(this)));
+
ConstrainedWebDialogDelegate* delegate = GetConstrainedDelegate();
if (!delegate)
return;
@@ -74,11 +79,6 @@ void ConstrainedWebDialogUI::RenderViewCreated(
web_ui()->AddMessageHandler(*it);
}
- // Add a "dialogClose" callback which matches WebDialogUI behavior.
- web_ui()->RegisterMessageCallback("dialogClose",
- base::Bind(&ConstrainedWebDialogUI::OnDialogCloseMessage,
- base::Unretained(this)));
-
dialog_delegate->OnDialogShown(web_ui(), render_view_host);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698