summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_view.h
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-01 21:39:31 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-01 21:39:31 +0000
commit634a6f9eb80c3b731d99735a3f4644ac2a9ca6be (patch)
tree0e5c69056108aa431be9ab96fe8a8da29070df59 /chrome/renderer/render_view.h
parenta1d906f9a26ee9b56be0bc78210cb5526f01ee2e (diff)
downloadchromium_src-634a6f9eb80c3b731d99735a3f4644ac2a9ca6be.zip
chromium_src-634a6f9eb80c3b731d99735a3f4644ac2a9ca6be.tar.gz
chromium_src-634a6f9eb80c3b731d99735a3f4644ac2a9ca6be.tar.bz2
Fix window.open()/window.close() regression by disabling window.close() until a message comes back
from the Browser thread saying that it's OK to allow javascript close calls. ISSUE=http://crbug.com/4007 Review URL: http://codereview.chromium.org/12691 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.h')
-rw-r--r--chrome/renderer/render_view.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index 7ee0f8f..0d6cda8 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -273,6 +273,7 @@ class RenderView : public RenderWidget, public WebViewDelegate,
// WebWidgetDelegate
// Most methods are handled by RenderWidget.
virtual void Show(WebWidget* webwidget, WindowOpenDisposition disposition);
+ virtual void CloseWidgetSoon(WebWidget* webwidget);
virtual void RunModal(WebWidget* webwidget);
// Do not delete directly. This class is reference counted.
@@ -471,6 +472,9 @@ class RenderView : public RenderWidget, public WebViewDelegate,
const std::vector<std::wstring>& suggestions,
int default_suggestions_index);
+ // Message that the popup notification has been shown or hidden.
+ void OnPopupNotificationVisiblityChanged(bool visible);
+
#ifdef CHROME_PERSONALIZATION
void OnPersonalizationEvent(std::string event_name, std::string event_args);
#endif
@@ -695,7 +699,16 @@ class RenderView : public RenderWidget, public WebViewDelegate,
// WebCore (via the window.history.go API). We only have one such navigation
// pending at a time.
scoped_refptr<WebHistoryItem> history_navigation_item_;
-
+
+ // We need to prevent windows from closing themselves with a window.close()
+ // call while a blocked popup notification is being displayed. We cannot
+ // synchronously querry the Browser process. We cannot wait for the Browser
+ // process to send a message to us saying that a blocked popup notification
+ // is being displayed. We instead assume that when we create a window off
+ // this RenderView, that it is going to be blocked until we get a message
+ // from the Browser process telling us otherwise.
+ bool popup_notification_visible_;
+
DISALLOW_COPY_AND_ASSIGN(RenderView);
};