Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index 9c40100612d6022542c28706a618ade5f8abd5e0..a1db1c788f49d0d9beee27c2458c32947557bf8b 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -2436,8 +2436,13 @@ void WebContentsImpl::DidStartNavigationTransition( |
RenderFrameHostImpl* render_frame_host) { |
#if defined(OS_ANDROID) |
int render_frame_id = render_frame_host->GetRoutingID(); |
- ContentViewCoreImpl::FromWebContents(this)-> |
- DidStartNavigationTransitionForFrame(render_frame_id); |
+ WebContentsAndroid* web_contents_android = |
Yaron
2014/08/07 01:20:44
Please extract a helper function and place alongsi
AKVT
2014/08/07 07:37:06
Done.
|
+ static_cast<WebContentsAndroid*>(GetUserData(kWebContentsAndroidKey)); |
+ if (!web_contents_android) { |
+ web_contents_android = new WebContentsAndroid(this); |
+ SetUserData(kWebContentsAndroidKey, web_contents_android); |
+ } |
+ web_contents_android->DidStartNavigationTransitionForFrame(render_frame_id); |
#endif |
} |
@@ -3626,15 +3631,26 @@ void WebContentsImpl::DidDeferAfterResponseStarted( |
const scoped_refptr<net::HttpResponseHeaders>& headers, |
const GURL& url) { |
#if defined(OS_ANDROID) |
- ContentViewCoreImpl::FromWebContents(this)->DidDeferAfterResponseStarted( |
- headers, url); |
+ WebContentsAndroid* web_contents_android = |
+ static_cast<WebContentsAndroid*>(GetUserData(kWebContentsAndroidKey)); |
+ if (!web_contents_android) { |
+ web_contents_android = new WebContentsAndroid(this); |
+ SetUserData(kWebContentsAndroidKey, web_contents_android); |
+ } |
+ web_contents_android->DidDeferAfterResponseStarted(headers, url); |
+ ; |
Yaron
2014/08/07 01:20:44
remove
AKVT
2014/08/07 07:37:06
Done.
|
#endif |
} |
bool WebContentsImpl::WillHandleDeferAfterResponseStarted() { |
#if defined(OS_ANDROID) |
- return ContentViewCoreImpl::FromWebContents(this)-> |
- WillHandleDeferAfterResponseStarted(); |
+ WebContentsAndroid* web_contents_android = |
+ static_cast<WebContentsAndroid*>(GetUserData(kWebContentsAndroidKey)); |
+ if (!web_contents_android) { |
+ web_contents_android = new WebContentsAndroid(this); |
+ SetUserData(kWebContentsAndroidKey, web_contents_android); |
+ } |
+ return web_contents_android->WillHandleDeferAfterResponseStarted(); |
#else |
return false; |
#endif |