| 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 "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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); | 615 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
| 616 if (!view) | 616 if (!view) |
| 617 return; | 617 return; |
| 618 | 618 |
| 619 view->OnShowingPastePopup(gfx::PointF(x_dip, y_dip)); | 619 view->OnShowingPastePopup(gfx::PointF(x_dip, y_dip)); |
| 620 | 620 |
| 621 JNIEnv* env = AttachCurrentThread(); | 621 JNIEnv* env = AttachCurrentThread(); |
| 622 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 622 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
| 623 if (obj.is_null()) | 623 if (obj.is_null()) |
| 624 return; | 624 return; |
| 625 Java_ContentViewCore_showPastePopup(env, obj.obj(), | 625 Java_ContentViewCore_showPastePopupWithFeedback(env, obj.obj(), |
| 626 static_cast<jint>(x_dip), | 626 static_cast<jint>(x_dip), |
| 627 static_cast<jint>(y_dip)); | 627 static_cast<jint>(y_dip)); |
| 628 } | 628 } |
| 629 | 629 |
| 630 void ContentViewCoreImpl::GetScaledContentBitmap( | 630 void ContentViewCoreImpl::GetScaledContentBitmap( |
| 631 float scale, | 631 float scale, |
| 632 SkColorType color_type, | 632 SkColorType color_type, |
| 633 gfx::Rect src_subrect, | 633 gfx::Rect src_subrect, |
| 634 const base::Callback<void(bool, const SkBitmap&)>& result_callback) { | 634 const base::Callback<void(bool, const SkBitmap&)>& result_callback) { |
| 635 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); | 635 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
| 636 if (!view) { | 636 if (!view) { |
| 637 result_callback.Run(false, SkBitmap()); | 637 result_callback.Run(false, SkBitmap()); |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1572 reinterpret_cast<ui::WindowAndroid*>(window_android), | 1572 reinterpret_cast<ui::WindowAndroid*>(window_android), |
| 1573 retained_objects_set); | 1573 retained_objects_set); |
| 1574 return reinterpret_cast<intptr_t>(view); | 1574 return reinterpret_cast<intptr_t>(view); |
| 1575 } | 1575 } |
| 1576 | 1576 |
| 1577 bool RegisterContentViewCore(JNIEnv* env) { | 1577 bool RegisterContentViewCore(JNIEnv* env) { |
| 1578 return RegisterNativesImpl(env); | 1578 return RegisterNativesImpl(env); |
| 1579 } | 1579 } |
| 1580 | 1580 |
| 1581 } // namespace content | 1581 } // namespace content |
| OLD | NEW |