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

Unified Diff: components/web_contents_delegate_android/web_contents_delegate_android.cc

Issue 11967015: Hide location bar on WebKit programmatic scroll. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Route requestHideTopControls through browser. Created 7 years, 9 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: components/web_contents_delegate_android/web_contents_delegate_android.cc
diff --git a/components/web_contents_delegate_android/web_contents_delegate_android.cc b/components/web_contents_delegate_android/web_contents_delegate_android.cc
index debb7b2a20e56cee0c5340bbd85ecf6107a773fe..c46e689d7084377709bbae9f04febe1da793e854 100644
--- a/components/web_contents_delegate_android/web_contents_delegate_android.cc
+++ b/components/web_contents_delegate_android/web_contents_delegate_android.cc
@@ -300,6 +300,21 @@ bool WebContentsDelegateAndroid::IsFullscreenForTabOrPending(
env, obj.obj());
}
+void WebContentsDelegateAndroid::RequestShowTopControls(
+ WebContents* web_contents, bool show) {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> content_view_core =
+ content::ContentViewCore::FromWebContents(web_contents)->GetJavaObject();
+ if (content_view_core.is_null())
+ return;
+ ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
+ if (obj.is_null())
+ return;
+ Java_WebContentsDelegateAndroid_requestShowTopControls(
+ env, obj.obj(), content_view_core.obj(), show);
+}
+
+
// ----------------------------------------------------------------------------
// Native JNI methods
// ----------------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698