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

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

Issue 643193003: Support InputMethodManager#updateCursorAnchorInfo for Android 5.0 (C++ version) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Send ImeCompositionRangeChanged only when necessary 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 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 =
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/renderer_host/ime_adapter_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698