summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-03 19:44:25 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-03 19:44:25 +0000
commite95ad331dcf3eed18d5851b4a97fc24d73a4b9cd (patch)
treef13a4b673087815f255e37eb46db445b1be3f71e /chrome/renderer
parent6aa881bebd77b8884229496d3d5592431dcd6227 (diff)
downloadchromium_src-e95ad331dcf3eed18d5851b4a97fc24d73a4b9cd.zip
chromium_src-e95ad331dcf3eed18d5851b4a97fc24d73a4b9cd.tar.gz
chromium_src-e95ad331dcf3eed18d5851b4a97fc24d73a4b9cd.tar.bz2
Delay loading of ExtensionHosts until the background page is ready.
BUG=13912 TEST=no Review URL: http://codereview.chromium.org/159756 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22302 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_view.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 91126bd..54305ee 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -1475,12 +1475,19 @@ void RenderView::DocumentElementAvailable(WebFrame* frame) {
// HACK. This is a temporary workaround to allow cross-origin XHR for Chrome
// extensions. It grants full access to every origin, when we really want
// to be able to restrict them more specifically.
- if (frame->GetURL().SchemeIs(chrome::kExtensionScheme))
+ GURL url = frame->GetURL();
+ if (url.SchemeIs(chrome::kExtensionScheme))
frame->GrantUniversalAccess();
if (RenderThread::current()) // Will be NULL during unit tests.
RenderThread::current()->user_script_slave()->InjectScripts(
frame, UserScript::DOCUMENT_START);
+
+ // Notify the browser about non-blank documents loading in the top frame.
+ if (url.is_valid() && url.spec() != "about:blank") {
+ if (frame == webview()->GetMainFrame())
+ Send(new ViewHostMsg_DocumentAvailableInMainFrame(routing_id_));
+ }
}
void RenderView::DidCreateScriptContextForFrame(WebFrame* webframe) {