| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 env, j_obj, event, selection_anchor.x(), selection_anchor.y(), | 634 env, j_obj, event, selection_anchor.x(), selection_anchor.y(), |
| 635 selection_rect.x(), selection_rect.y(), selection_rect.right(), | 635 selection_rect.x(), selection_rect.y(), selection_rect.right(), |
| 636 selection_rect.bottom()); | 636 selection_rect.bottom()); |
| 637 } | 637 } |
| 638 | 638 |
| 639 void ContentViewCoreImpl::ShowPastePopup(int x_dip, int y_dip) { | 639 void ContentViewCoreImpl::ShowPastePopup(int x_dip, int y_dip) { |
| 640 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); | 640 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
| 641 if (!view) | 641 if (!view) |
| 642 return; | 642 return; |
| 643 | 643 |
| 644 view->OnShowingPastePopup(gfx::PointF(x_dip, y_dip)); | |
| 645 | |
| 646 JNIEnv* env = AttachCurrentThread(); | 644 JNIEnv* env = AttachCurrentThread(); |
| 647 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 645 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
| 648 if (obj.is_null()) | 646 if (obj.is_null()) |
| 649 return; | 647 return; |
| 650 Java_ContentViewCore_showPastePopup(env, obj, x_dip, | 648 Java_ContentViewCore_showPastePopup(env, obj, x_dip, |
| 651 y_dip); | 649 y_dip); |
| 652 } | 650 } |
| 653 | 651 |
| 654 void ContentViewCoreImpl::StartContentIntent(const GURL& content_url, | 652 void ContentViewCoreImpl::StartContentIntent(const GURL& content_url, |
| 655 bool is_main_frame) { | 653 bool is_main_frame) { |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1571 return ScopedJavaLocalRef<jobject>(); | 1569 return ScopedJavaLocalRef<jobject>(); |
| 1572 | 1570 |
| 1573 return view->GetJavaObject(); | 1571 return view->GetJavaObject(); |
| 1574 } | 1572 } |
| 1575 | 1573 |
| 1576 bool RegisterContentViewCore(JNIEnv* env) { | 1574 bool RegisterContentViewCore(JNIEnv* env) { |
| 1577 return RegisterNativesImpl(env); | 1575 return RegisterNativesImpl(env); |
| 1578 } | 1576 } |
| 1579 | 1577 |
| 1580 } // namespace content | 1578 } // namespace content |
| OLD | NEW |