summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
authorericdingle@google.com <ericdingle@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-06 18:35:29 +0000
committerericdingle@google.com <ericdingle@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-06 18:35:29 +0000
commit5cce3cd134a69809feab9086c0ff52cbd87bae0e (patch)
treee76f43828db3db5ec583fc5f43429c712e068c73 /chrome/browser/renderer_host
parent656475d275524893e4e9b1f02469fe470721a14e (diff)
downloadchromium_src-5cce3cd134a69809feab9086c0ff52cbd87bae0e.zip
chromium_src-5cce3cd134a69809feab9086c0ff52cbd87bae0e.tar.gz
chromium_src-5cce3cd134a69809feab9086c0ff52cbd87bae0e.tar.bz2
Disallow display of multiple experimental.extension.popup(...) windows.
Patch 1 contains twiz@'s code reviewed implementation from http://codereview.chromium.org/1512007. This CL is to address the failure of release tests. BUG=None TEST=ExtensionApiTest.Popup Review URL: http://codereview.chromium.org/1921003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46592 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc6
-rw-r--r--chrome/browser/renderer_host/render_view_host.h1
-rw-r--r--chrome/browser/renderer_host/render_view_host_delegate.h4
3 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index 285e24e..ea0d855 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -727,6 +727,8 @@ void RenderViewHost::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_DidStopLoading, OnMsgDidStopLoading)
IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame,
OnMsgDocumentAvailableInMainFrame)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentOnLoadCompletedInMainFrame,
+ OnMsgDocumentOnLoadCompletedInMainFrame)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidLoadResourceFromMemoryCache,
OnMsgDidLoadResourceFromMemoryCache)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidDisplayInsecureContent,
@@ -1056,6 +1058,10 @@ void RenderViewHost::OnMsgDocumentAvailableInMainFrame() {
delegate_->DocumentAvailableInMainFrame(this);
}
+void RenderViewHost::OnMsgDocumentOnLoadCompletedInMainFrame() {
+ delegate_->DocumentOnLoadCompletedInMainFrame(this);
+}
+
void RenderViewHost::OnMsgDidLoadResourceFromMemoryCache(
const GURL& url,
const std::string& frame_origin,
diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h
index c5bec3c..8ca6c98 100644
--- a/chrome/browser/renderer_host/render_view_host.h
+++ b/chrome/browser/renderer_host/render_view_host.h
@@ -505,6 +505,7 @@ class RenderViewHost : public RenderWidgetHost {
void OnMsgDidStartLoading();
void OnMsgDidStopLoading();
void OnMsgDocumentAvailableInMainFrame();
+ void OnMsgDocumentOnLoadCompletedInMainFrame();
void OnMsgDidLoadResourceFromMemoryCache(const GURL& url,
const std::string& frame_origin,
const std::string& main_frame_origin,
diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h
index 233099c..b8ca5f0 100644
--- a/chrome/browser/renderer_host/render_view_host_delegate.h
+++ b/chrome/browser/renderer_host/render_view_host_delegate.h
@@ -537,6 +537,10 @@ class RenderViewHostDelegate {
// the document has finished parsing.
virtual void DocumentAvailableInMainFrame(RenderViewHost* render_view_host) {}
+ // The onload handler in the RenderView's main frame has completed.
+ virtual void DocumentOnLoadCompletedInMainFrame(
+ RenderViewHost* render_view_host) {}
+
// The page wants to open a URL with the specified disposition.
virtual void RequestOpenURL(const GURL& url,
const GURL& referrer,