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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 12697002: [Android WebView] Provide more information about WebView for web debugging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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: 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
// -------------------------------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698