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

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

Issue 139563004: Notification on finish handling of top control gesture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 page_scale_factor_limits.y(), 423 page_scale_factor_limits.y(),
424 content_size.width(), 424 content_size.width(),
425 content_size.height(), 425 content_size.height(),
426 viewport_size.width(), 426 viewport_size.width(),
427 viewport_size.height(), 427 viewport_size.height(),
428 controls_offset.y(), 428 controls_offset.y(),
429 content_offset.y(), 429 content_offset.y(),
430 overdraw_bottom_height); 430 overdraw_bottom_height);
431 } 431 }
432 432
433 void ContentViewCoreImpl::DidFinishTopControlsGesture() {
434 JNIEnv* env = AttachCurrentThread();
435 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
436 if (obj.is_null())
437 return;
438 Java_ContentViewCore_onTopControlsGestureFinished(env, obj.obj());
439 }
440
433 void ContentViewCoreImpl::SetTitle(const base::string16& title) { 441 void ContentViewCoreImpl::SetTitle(const base::string16& title) {
434 JNIEnv* env = AttachCurrentThread(); 442 JNIEnv* env = AttachCurrentThread();
435 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 443 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
436 if (obj.is_null()) 444 if (obj.is_null())
437 return; 445 return;
438 ScopedJavaLocalRef<jstring> jtitle = 446 ScopedJavaLocalRef<jstring> jtitle =
439 ConvertUTF8ToJavaString(env, base::UTF16ToUTF8(title)); 447 ConvertUTF8ToJavaString(env, base::UTF16ToUTF8(title));
440 Java_ContentViewCore_setTitle(env, obj.obj(), jtitle.obj()); 448 Java_ContentViewCore_setTitle(env, obj.obj(), jtitle.obj());
441 } 449 }
442 450
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1682 reinterpret_cast<ui::ViewAndroid*>(view_android), 1690 reinterpret_cast<ui::ViewAndroid*>(view_android),
1683 reinterpret_cast<ui::WindowAndroid*>(window_android)); 1691 reinterpret_cast<ui::WindowAndroid*>(window_android));
1684 return reinterpret_cast<intptr_t>(view); 1692 return reinterpret_cast<intptr_t>(view);
1685 } 1693 }
1686 1694
1687 bool RegisterContentViewCore(JNIEnv* env) { 1695 bool RegisterContentViewCore(JNIEnv* env) {
1688 return RegisterNativesImpl(env); 1696 return RegisterNativesImpl(env);
1689 } 1697 }
1690 1698
1691 } // namespace content 1699 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/android/in_process/synchronous_input_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698