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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 699333003: Support InputMethodManager#updateCursorAnchorInfo for Android 5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
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 312de234bb96f1205956e98f00ea6906eaf73093..10faac294c0274129c0848e6e3f933cc6c39dfec 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -1241,6 +1241,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 =

Powered by Google App Engine
This is Rietveld 408576698