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

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

Issue 15029006: Make it possible for the scroll offset delegate to intercept fling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reactivate the patch! Created 7 years, 4 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 | Annotate | Revision Log
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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 464
465 void ContentViewCoreImpl::ConfirmTouchEvent(InputEventAckState ack_result) { 465 void ContentViewCoreImpl::ConfirmTouchEvent(InputEventAckState ack_result) {
466 JNIEnv* env = AttachCurrentThread(); 466 JNIEnv* env = AttachCurrentThread();
467 ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env); 467 ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env);
468 if (j_obj.is_null()) 468 if (j_obj.is_null())
469 return; 469 return;
470 Java_ContentViewCore_confirmTouchEvent(env, j_obj.obj(), 470 Java_ContentViewCore_confirmTouchEvent(env, j_obj.obj(),
471 static_cast<jint>(ack_result)); 471 static_cast<jint>(ack_result));
472 } 472 }
473 473
474 void ContentViewCoreImpl::UnhandledFlingStartEvent() {
475 JNIEnv* env = AttachCurrentThread();
476 ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env);
477 if (j_obj.is_null())
478 return;
479 Java_ContentViewCore_unhandledFlingStartEvent(env, j_obj.obj());
480 }
481
474 void ContentViewCoreImpl::HasTouchEventHandlers(bool need_touch_events) { 482 void ContentViewCoreImpl::HasTouchEventHandlers(bool need_touch_events) {
475 JNIEnv* env = AttachCurrentThread(); 483 JNIEnv* env = AttachCurrentThread();
476 ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env); 484 ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env);
477 if (j_obj.is_null()) 485 if (j_obj.is_null())
478 return; 486 return;
479 Java_ContentViewCore_hasTouchEventHandlers(env, 487 Java_ContentViewCore_hasTouchEventHandlers(env,
480 j_obj.obj(), 488 j_obj.obj(),
481 need_touch_events); 489 need_touch_events);
482 } 490 }
483 491
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 reinterpret_cast<ui::ViewAndroid*>(view_android), 1594 reinterpret_cast<ui::ViewAndroid*>(view_android),
1587 reinterpret_cast<ui::WindowAndroid*>(window_android)); 1595 reinterpret_cast<ui::WindowAndroid*>(window_android));
1588 return reinterpret_cast<jint>(view); 1596 return reinterpret_cast<jint>(view);
1589 } 1597 }
1590 1598
1591 bool RegisterContentViewCore(JNIEnv* env) { 1599 bool RegisterContentViewCore(JNIEnv* env) {
1592 return RegisterNativesImpl(env); 1600 return RegisterNativesImpl(env);
1593 } 1601 }
1594 1602
1595 } // namespace content 1603 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698