diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-21 04:42:54 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-21 04:42:54 +0000 |
commit | 77f17a8a4b03e493392f04a77d97ea6e1379760d (patch) | |
tree | 43b549e31e17bd26849230d37a4a56b4ff631c5b /webkit/glue/webframe_impl.h | |
parent | 852cb1e5ecef7e815963213013e94485654cf5cd (diff) | |
download | chromium_src-77f17a8a4b03e493392f04a77d97ea6e1379760d.zip chromium_src-77f17a8a4b03e493392f04a77d97ea6e1379760d.tar.gz chromium_src-77f17a8a4b03e493392f04a77d97ea6e1379760d.tar.bz2 |
Move ExtraData from WebRequest to WebDataSource.
This adds a DidCreateDataSource method to WebViewDelegate,
which the embedder uses to know if their LoadRequest
resulted in a navigation. The embedder then associates the
ExtraData with the WebDataSource at that point. The
WebDataSource then proceeds to be treated as the provisional
data source, possibly failing or being committed. We then
inspect WebFrame::GetDataSource in DidCommitLoadForFrame to
recover the ExtraData.
We have to take care to handle reference fragment
navigations since those do not result in a new WebDataSource
being created. So, in DidChangeLocationWithinPage, we
update the ExtraData associated with the WebDataSource
returned by WebFrame::GetDataSource.
One thing that is important to note: In
DidCommitLoadForFrame, we would previously always inspect
the value of GetDataSource returned from the main frame
instead of looking at the frame passed to
DidCommitLoadForFrame. This explains why WebFrameImpl::
LoadRequest needed to cached ExtraData on the current
WebDataSource, and I think doing so is awkward and wrong.
My change is to always store the ExtraData on the first
WebDataSource to be created as a result of LoadRequest.
Then in DidCommitLoadForFrame, I always inspect the
ExtraData from the given WebFrame. This means that for
history navigations that only navigate a subframe, we'll end
up with ExtraData associated with the WebDataSource of a
subframe. I think this is OK even though the old code was
trying to avoid this scenario. See the DCHECK removed in
RenderView::UpdateURL.
BUG=11423
R=brettw
Review URL: http://codereview.chromium.org/115575
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframe_impl.h')
-rw-r--r-- | webkit/glue/webframe_impl.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h index 45cdc91..2d51ed6 100644 --- a/webkit/glue/webframe_impl.h +++ b/webkit/glue/webframe_impl.h @@ -221,10 +221,6 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> { return frame_ ? frame_->view() : NULL; } - // Update the given datasource with currently_loading_request's info. - // If currently_loading_request is NULL, does nothing. - void CacheCurrentRequestInfo(WebDataSourceImpl* datasource); - // Getters for the impls corresponding to Get(Provisional)DataSource. They // may return NULL if there is no corresponding data source. WebDataSourceImpl* GetDataSourceImpl() const; |