| 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);
|
| }
|
|
|
|
|