Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1624)

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 414423002: Removing ContentViewCore dependencies from few functions which acts as direct wrapper to WebContents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed setHasPendingNavigationTransitionForTesting from CVC. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 f644ee953f583cfcd0166de4eb0c8e5b7656d08a..57ed3e75fd96487b72b2d9d8ce53688eacb8468a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2429,8 +2429,8 @@ 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);
+ GetWebContentsAndroid()->DidStartNavigationTransitionForFrame(
+ render_frame_id);
#endif
}
@@ -3604,15 +3604,13 @@ void WebContentsImpl::SwappedOut(RenderFrameHost* rfh) {
void WebContentsImpl::DidDeferAfterResponseStarted(
const TransitionLayerData& transition_data) {
#if defined(OS_ANDROID)
- ContentViewCoreImpl::FromWebContents(this)->DidDeferAfterResponseStarted(
- transition_data);
+ GetWebContentsAndroid()->DidDeferAfterResponseStarted(transition_data);
#endif
}
bool WebContentsImpl::WillHandleDeferAfterResponseStarted() {
#if defined(OS_ANDROID)
- return ContentViewCoreImpl::FromWebContents(this)->
- WillHandleDeferAfterResponseStarted();
+ return GetWebContentsAndroid()->WillHandleDeferAfterResponseStarted();
#else
return false;
#endif
@@ -4098,14 +4096,17 @@ bool WebContentsImpl::CreateRenderFrameForRenderManager(
base::android::ScopedJavaLocalRef<jobject>
WebContentsImpl::GetJavaWebContents() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ return GetWebContentsAndroid()->GetJavaObject();
+}
+WebContentsAndroid* WebContentsImpl::GetWebContentsAndroid() {
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->GetJavaObject();
+ return web_contents_android;
}
bool WebContentsImpl::CreateRenderViewForInitialEmptyDocument() {

Powered by Google App Engine
This is Rietveld 408576698