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

Side by Side Diff: content/browser/android/content_view_core_impl.cc

Issue 14139013: Hide location bar on Javascript-initiated scroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge after sync. Created 7 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/android/content_view_core_impl.h" 5 #include "content/browser/android/content_view_core_impl.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 bool enable_hiding, 1258 bool enable_hiding,
1259 bool enable_showing, 1259 bool enable_showing,
1260 bool animate) { 1260 bool animate) {
1261 RenderViewHost* host = web_contents_->GetRenderViewHost(); 1261 RenderViewHost* host = web_contents_->GetRenderViewHost();
1262 host->Send(new ViewMsg_UpdateTopControlsState(host->GetRoutingID(), 1262 host->Send(new ViewMsg_UpdateTopControlsState(host->GetRoutingID(),
1263 enable_hiding, 1263 enable_hiding,
1264 enable_showing, 1264 enable_showing,
1265 animate)); 1265 animate));
1266 } 1266 }
1267 1267
1268 void ContentViewCoreImpl::ShowTopControls(JNIEnv* env, jobject obj, bool show) {
1269 RenderViewHost* host = web_contents_->GetRenderViewHost();
1270 host->Send(new ViewMsg_ShowTopControls(host->GetRoutingID(), show));
jam 2013/04/17 16:24:59 it's simpler to just do web_contents_->Send(new F
Michael van Ouwerkerk 2013/04/18 18:11:38 Done.
1271 }
1272
1268 void ContentViewCoreImpl::ShowImeIfNeeded(JNIEnv* env, jobject obj) { 1273 void ContentViewCoreImpl::ShowImeIfNeeded(JNIEnv* env, jobject obj) {
1269 RenderViewHost* host = web_contents_->GetRenderViewHost(); 1274 RenderViewHost* host = web_contents_->GetRenderViewHost();
1270 host->Send(new ViewMsg_ShowImeIfNeeded(host->GetRoutingID())); 1275 host->Send(new ViewMsg_ShowImeIfNeeded(host->GetRoutingID()));
1271 } 1276 }
1272 1277
1273 void ContentViewCoreImpl::ScrollFocusedEditableNodeIntoView(JNIEnv* env, 1278 void ContentViewCoreImpl::ScrollFocusedEditableNodeIntoView(JNIEnv* env,
1274 jobject obj) { 1279 jobject obj) {
1275 RenderViewHost* host = web_contents_->GetRenderViewHost(); 1280 RenderViewHost* host = web_contents_->GetRenderViewHost();
1276 host->Send(new ViewMsg_ScrollFocusedEditableNodeIntoRect(host->GetRoutingID(), 1281 host->Send(new ViewMsg_ScrollFocusedEditableNodeIntoRect(host->GetRoutingID(),
1277 gfx::Rect())); 1282 gfx::Rect()));
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 reinterpret_cast<WebContents*>(native_web_contents), 1484 reinterpret_cast<WebContents*>(native_web_contents),
1480 reinterpret_cast<ui::WindowAndroid*>(native_window)); 1485 reinterpret_cast<ui::WindowAndroid*>(native_window));
1481 return reinterpret_cast<jint>(view); 1486 return reinterpret_cast<jint>(view);
1482 } 1487 }
1483 1488
1484 bool RegisterContentViewCore(JNIEnv* env) { 1489 bool RegisterContentViewCore(JNIEnv* env) {
1485 return RegisterNativesImpl(env); 1490 return RegisterNativesImpl(env);
1486 } 1491 }
1487 1492
1488 } // namespace content 1493 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698