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

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

Issue 26664002: SyntheticGestureTarget implementation for injecting synthetic input events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add virtual to dtor Created 7 years, 1 month 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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 ScopedJavaLocalRef<jobject> java_bitmap = 571 ScopedJavaLocalRef<jobject> java_bitmap =
572 gfx::ConvertToJavaBitmap(&zoomed_bitmap); 572 gfx::ConvertToJavaBitmap(&zoomed_bitmap);
573 DCHECK(!java_bitmap.is_null()); 573 DCHECK(!java_bitmap.is_null());
574 574
575 Java_ContentViewCore_showDisambiguationPopup(env, 575 Java_ContentViewCore_showDisambiguationPopup(env,
576 obj.obj(), 576 obj.obj(),
577 rect_object.obj(), 577 rect_object.obj(),
578 java_bitmap.obj()); 578 java_bitmap.obj());
579 } 579 }
580 580
581 ScopedJavaLocalRef<jobject> ContentViewCoreImpl::CreateTouchEventSynthesizer() {
582 JNIEnv* env = AttachCurrentThread();
583
584 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
585 if (obj.is_null())
586 return ScopedJavaLocalRef<jobject>();
587 return Java_ContentViewCore_createTouchEventSynthesizer(env, obj.obj());
588 }
589
581 ScopedJavaLocalRef<jobject> ContentViewCoreImpl::CreateOnePointTouchGesture( 590 ScopedJavaLocalRef<jobject> ContentViewCoreImpl::CreateOnePointTouchGesture(
582 int32 start_x, int32 start_y, int32 delta_x, int32 delta_y) { 591 int32 start_x, int32 start_y, int32 delta_x, int32 delta_y) {
583 JNIEnv* env = AttachCurrentThread(); 592 JNIEnv* env = AttachCurrentThread();
584 593
585 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 594 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
586 if (obj.is_null()) 595 if (obj.is_null())
587 return ScopedJavaLocalRef<jobject>(); 596 return ScopedJavaLocalRef<jobject>();
588 return Java_ContentViewCore_createOnePointTouchGesture( 597 return Java_ContentViewCore_createOnePointTouchGesture(
589 env, obj.obj(), start_x, start_y, delta_x, delta_y); 598 env, obj.obj(), start_x, start_y, delta_x, delta_y);
590 } 599 }
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
1640 reinterpret_cast<ui::ViewAndroid*>(view_android), 1649 reinterpret_cast<ui::ViewAndroid*>(view_android),
1641 reinterpret_cast<ui::WindowAndroid*>(window_android)); 1650 reinterpret_cast<ui::WindowAndroid*>(window_android));
1642 return reinterpret_cast<jint>(view); 1651 return reinterpret_cast<jint>(view);
1643 } 1652 }
1644 1653
1645 bool RegisterContentViewCore(JNIEnv* env) { 1654 bool RegisterContentViewCore(JNIEnv* env) {
1646 return RegisterNativesImpl(env); 1655 return RegisterNativesImpl(env);
1647 } 1656 }
1648 1657
1649 } // namespace content 1658 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698