Index: android_webview/java/src/org/chromium/android_webview/AwContents.java |
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java |
index 5db36f06e07859b0c0d6c852cad9f821a43e4bd8..f2f078f981f1084f394245fb20e2208cdfdaa198 100644 |
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java |
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java |
@@ -960,6 +960,27 @@ public class AwContents { |
return mContainerView.performLongClick(); |
} |
+ @CalledByNative |
+ private boolean isAttachedToViewHierarchy() { |
joth
2013/03/08 23:23:46
shouldn't need this method: we already pushed the
mnaganov (inactive)
2013/03/11 14:39:20
Right. When I first tried using these notification
|
+ if (mContainerView.getWindowToken() == null) { |
+ // Not attached to a window. |
+ return false; |
+ } |
+ // Verify that the whole subtree containing the view is attached. |
+ View parent = mContainerView; |
+ while (parent.getParent() != null && parent.getParent() instanceof View) { |
+ parent = (View) parent.getParent(); |
+ } |
+ return parent == mContainerView.getRootView(); |
+ } |
+ |
+ @CalledByNative |
+ private int[] getLocationOnScreen() { |
+ int[] result = new int[2]; |
+ mContainerView.getLocationOnScreen(result); |
+ return result; |
+ } |
+ |
// ------------------------------------------------------------------------------------------- |
// Helper methods |
// ------------------------------------------------------------------------------------------- |