summaryrefslogtreecommitdiffstats
path: root/android_webview/native
diff options
context:
space:
mode:
authorhush <hush@chromium.org>2015-02-26 10:32:07 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-26 18:32:44 +0000
commit7d13f84e80288f530a99d4ef635e4976d43211ef (patch)
treea939aad6e24d0c18e5458bab9187600bbb7e04d9 /android_webview/native
parent6fd58296fde4dd24dab7e4d3a8a66d46b90b01c0 (diff)
downloadchromium_src-7d13f84e80288f530a99d4ef635e4976d43211ef.zip
chromium_src-7d13f84e80288f530a99d4ef635e4976d43211ef.tar.gz
chromium_src-7d13f84e80288f530a99d4ef635e4976d43211ef.tar.bz2
Remove android_webview/browser layer's dependency on native/
Exposed a function BrowserViewRenderer::FromWebContents to allow android_webview/browser/ layer to get hold of the instance of BrowserViewRenderer through WebContents, without the help of AwContents, which is in android_webview/native/ layer. BUG=459779, 460826 Review URL: https://codereview.chromium.org/950973003 Cr-Commit-Position: refs/heads/master@{#318264}
Diffstat (limited to 'android_webview/native')
-rw-r--r--android_webview/native/aw_contents.cc7
-rw-r--r--android_webview/native/aw_contents.h2
2 files changed, 2 insertions, 7 deletions
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index 0b034ed..8580478 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -170,8 +170,9 @@ AwContents::AwContents(scoped_ptr<WebContents> web_contents)
base::subtle::NoBarrier_AtomicIncrement(&g_instance_count, 1);
icon_helper_.reset(new IconHelper(web_contents_.get()));
icon_helper_->SetListener(this);
- web_contents_->SetUserData(kAwContentsUserDataKey,
+ web_contents_->SetUserData(android_webview::kAwContentsUserDataKey,
new AwContentsUserData(this));
+ browser_view_renderer_.RegisterWithWebContents(web_contents_.get());
render_view_host_ext_.reset(
new AwRenderViewHostExt(this, web_contents_.get()));
@@ -988,10 +989,6 @@ void AwContents::DidOverscroll(gfx::Vector2d overscroll_delta) {
env, obj.obj(), overscroll_delta.x(), overscroll_delta.y());
}
-const BrowserViewRenderer* AwContents::GetBrowserViewRenderer() const {
- return &browser_view_renderer_;
-}
-
void AwContents::SetDipScale(JNIEnv* env, jobject obj, jfloat dip_scale) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
browser_view_renderer_.SetDipScale(dip_scale);
diff --git a/android_webview/native/aw_contents.h b/android_webview/native/aw_contents.h
index edb60ef..26e60f2 100644
--- a/android_webview/native/aw_contents.h
+++ b/android_webview/native/aw_contents.h
@@ -206,8 +206,6 @@ class AwContents : public FindHelper::Listener,
float max_page_scale_factor) override;
void DidOverscroll(gfx::Vector2d overscroll_delta) override;
- const BrowserViewRenderer* GetBrowserViewRenderer() const;
-
void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files);
void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending);
jlong ReleasePopupAwContents(JNIEnv* env, jobject obj);