Index: content/browser/android/content_view_core_impl.cc |
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc |
index 5fd29f12512c4cd97d3e5dbdf8bf6b49f29d14b3..43812bd454246b18dfc32bc036ee3c2da69aac05 100644 |
--- a/content/browser/android/content_view_core_impl.cc |
+++ b/content/browser/android/content_view_core_impl.cc |
@@ -1242,6 +1242,19 @@ bool ContentViewCoreImpl::IsFullscreenRequiredForOrientationLock() const { |
obj.obj()); |
} |
+gfx::Vector2d ContentViewCoreImpl::GetLocationOnScreen() const { |
+ JNIEnv* env = AttachCurrentThread(); |
+ ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
+ if (obj.is_null()) |
+ return gfx::Vector2d(); |
+ const uint64 combined_coordinates = static_cast<uint64>( |
+ Java_ContentViewCore_getLocationOnScreen(env, obj.obj())); |
+ const uint32 high_dword = static_cast<uint32>(combined_coordinates >> 32); |
+ const uint32 low_dword = static_cast<uint32>(combined_coordinates); |
+ return gfx::Vector2d(static_cast<int32>(high_dword), |
+ static_cast<int32>(low_dword)); |
+} |
+ |
void ContentViewCoreImpl::SetAccessibilityEnabledInternal(bool enabled) { |
accessibility_enabled_ = enabled; |
BrowserAccessibilityStateImpl* accessibility_state = |