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

Unified Diff: ui/views/controls/webview/web_dialog_view.h

Issue 12091075: Fix the issue introduced by hooking window.onbeforeunload in WebDialogView which breaks WebDialogUI… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | ui/views/controls/webview/web_dialog_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/webview/web_dialog_view.h
diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
index a55717db6928b1e5d3364e659555bf539836774a..df6c8a9cd39d8e882afffd916e73464ea2d039fb 100644
--- a/ui/views/controls/webview/web_dialog_view.h
+++ b/ui/views/controls/webview/web_dialog_view.h
@@ -86,6 +86,8 @@ class WEBVIEW_EXPORT WebDialogView : public views::ClientView,
content::WebUI* webui,
content::RenderViewHost* render_view_host) OVERRIDE;
virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
+ virtual void OnDialogCloseFromWebUI(
+ const std::string& json_retval) OVERRIDE;
virtual void OnCloseContents(content::WebContents* source,
bool* out_close_dialog) OVERRIDE;
virtual bool ShouldShowDialogTitle() const OVERRIDE;
@@ -140,6 +142,13 @@ class WEBVIEW_EXPORT WebDialogView : public views::ClientView,
// beforeunload event.
bool before_unload_fired_;
+ // Whether the dialog is closed from WebUI in response to a "DialogClose"
+ // message.
+ bool closed_via_webui_;
+
+ // A json string returned to WebUI from a "DialogClosed" message.
+ std::string dialog_close_retval_;
+
DISALLOW_COPY_AND_ASSIGN(WebDialogView);
};
« no previous file with comments | « no previous file | ui/views/controls/webview/web_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698