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

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 ShowTopControls into UpdateTopControlsState, use new TopControlsState enum in plumbing, gener… Created 7 years, 7 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 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 return view && view->HasValidFrame(); 1277 return view && view->HasValidFrame();
1278 } 1278 }
1279 1279
1280 void ContentViewCoreImpl::ExitFullscreen(JNIEnv* env, jobject obj) { 1280 void ContentViewCoreImpl::ExitFullscreen(JNIEnv* env, jobject obj) {
1281 RenderViewHost* host = web_contents_->GetRenderViewHost(); 1281 RenderViewHost* host = web_contents_->GetRenderViewHost();
1282 host->ExitFullscreen(); 1282 host->ExitFullscreen();
1283 } 1283 }
1284 1284
1285 void ContentViewCoreImpl::UpdateTopControlsState(JNIEnv* env, 1285 void ContentViewCoreImpl::UpdateTopControlsState(JNIEnv* env,
1286 jobject obj, 1286 jobject obj,
1287 bool enable_hiding, 1287 jint constraints,
1288 bool enable_showing, 1288 jint current,
1289 bool animate) { 1289 bool animate) {
1290 RenderViewHost* host = web_contents_->GetRenderViewHost(); 1290 RenderViewHost* host = web_contents_->GetRenderViewHost();
1291 cc::TopControlsState constraints_state =
1292 static_cast<cc::TopControlsState>(constraints);
1293 cc::TopControlsState current_state =
1294 static_cast<cc::TopControlsState>(current);
1291 host->Send(new ViewMsg_UpdateTopControlsState(host->GetRoutingID(), 1295 host->Send(new ViewMsg_UpdateTopControlsState(host->GetRoutingID(),
1292 enable_hiding, 1296 constraints_state,
1293 enable_showing, 1297 current_state,
1294 animate)); 1298 animate));
1295 } 1299 }
1296 1300
1297 void ContentViewCoreImpl::ShowImeIfNeeded(JNIEnv* env, jobject obj) { 1301 void ContentViewCoreImpl::ShowImeIfNeeded(JNIEnv* env, jobject obj) {
1298 RenderViewHost* host = web_contents_->GetRenderViewHost(); 1302 RenderViewHost* host = web_contents_->GetRenderViewHost();
1299 host->Send(new ViewMsg_ShowImeIfNeeded(host->GetRoutingID())); 1303 host->Send(new ViewMsg_ShowImeIfNeeded(host->GetRoutingID()));
1300 } 1304 }
1301 1305
1302 void ContentViewCoreImpl::ScrollFocusedEditableNodeIntoView(JNIEnv* env, 1306 void ContentViewCoreImpl::ScrollFocusedEditableNodeIntoView(JNIEnv* env,
1303 jobject obj) { 1307 jobject obj) {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 reinterpret_cast<ui::ViewAndroid*>(view_android), 1522 reinterpret_cast<ui::ViewAndroid*>(view_android),
1519 reinterpret_cast<ui::WindowAndroid*>(window_android)); 1523 reinterpret_cast<ui::WindowAndroid*>(window_android));
1520 return reinterpret_cast<jint>(view); 1524 return reinterpret_cast<jint>(view);
1521 } 1525 }
1522 1526
1523 bool RegisterContentViewCore(JNIEnv* env) { 1527 bool RegisterContentViewCore(JNIEnv* env) {
1524 return RegisterNativesImpl(env); 1528 return RegisterNativesImpl(env);
1525 } 1529 }
1526 1530
1527 } // namespace content 1531 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698