summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/render_view_host.h
diff options
context:
space:
mode:
authortwiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-30 22:39:22 +0000
committertwiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-30 22:39:22 +0000
commit16e3d45d6fd4a2203ddb248d636dcd320a3639f0 (patch)
treea5b9c90129b896ccaa112e5afc4e390adc8e0571 /chrome/browser/renderer_host/render_view_host.h
parentf325f1e12a828a0a3fa74f75e1b2ea8cb49b0102 (diff)
downloadchromium_src-16e3d45d6fd4a2203ddb248d636dcd320a3639f0.zip
chromium_src-16e3d45d6fd4a2203ddb248d636dcd320a3639f0.tar.gz
chromium_src-16e3d45d6fd4a2203ddb248d636dcd320a3639f0.tar.bz2
Clean-up of the asynchronous behaviour of the experimental extension popup API.
- It was previously possible to programmatically launch two popups from the same extension. (Simply call popup.show twice in a row, or in a callback chain.) I removed this incorrect funcationality by registering ExtensionPopupHost to listen for EXTENSION_HOST_CREATED notifications. If a popup is shown, and a new ExtensionHost is constructed of type EXTENSION_POPUP, then the presently displayed popup is dismissed. - The callback function for popup.show(...) was previously called in response to EXTENSION_POPUP_VIEW_READY, as processed in response to a ViewHostMsg_DocumentAvailableInMainFrame message. This message wassent after PARSING of the conent of the popup view. Because of this behaviour, the API was difficult to use because one could not meaningfully interact with the popup page during the callback: The callback would race with completion of the onload handler within the popup, so some sort of polling for onload-complete was required. I fixed the problem by adding new notifications and messages so that EXTENSION_POPUP_VIEW_READY is now sent only after all onload handlers have been invoked.Corresponding unit-tests have also been added. BUG=None TEST=ExtensionApiTest.Popup Review URL: http://codereview.chromium.org/1512007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_view_host.h')
-rw-r--r--chrome/browser/renderer_host/render_view_host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h
index b384d6d..ea1ba15 100644
--- a/chrome/browser/renderer_host/render_view_host.h
+++ b/chrome/browser/renderer_host/render_view_host.h
@@ -497,6 +497,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,