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/weburlrequest_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/weburlrequest_impl.h')
-rw-r--r-- | webkit/glue/weburlrequest_impl.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/webkit/glue/weburlrequest_impl.h b/webkit/glue/weburlrequest_impl.h index 968dbc0..5a613b3 100644 --- a/webkit/glue/weburlrequest_impl.h +++ b/webkit/glue/weburlrequest_impl.h @@ -23,8 +23,6 @@ class WebRequestImpl : public WebRequest { // WebRequest virtual WebRequest* Clone() const; - virtual void SetExtraData(ExtraData* extra); - virtual ExtraData* GetExtraData() const; virtual void SetURL(const GURL& url); virtual GURL GetURL() const; virtual void SetMainDocumentURL(const GURL& url); @@ -63,7 +61,6 @@ class WebRequestImpl : public WebRequest { protected: WebCore::FrameLoadRequest request_; RefPtr<WebCore::HistoryItem> history_item_; - scoped_refptr<ExtraData> extra_data_; }; #endif // #ifndef WEBKIT_GLUE_WEBURLREQUEST_IMPL_H_ |