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

Unified Diff: android_webview/browser/browser_view_renderer.h

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/browser/browser_view_renderer.h
diff --git a/android_webview/browser/browser_view_renderer.h b/android_webview/browser/browser_view_renderer.h
index 02f47bcc714770b995ad702f0203e0c35763251f..09de2b0f0034899f9316200b37d0ac33493f205f 100644
--- a/android_webview/browser/browser_view_renderer.h
+++ b/android_webview/browser/browser_view_renderer.h
@@ -6,11 +6,14 @@
#define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
#include "base/android/scoped_java_ref.h"
+#include "ui/gfx/point.h"
+#include "ui/gfx/rect.h"
struct AwDrawGLInfo;
namespace content {
class ContentViewCore;
+class WebContents;
}
namespace gfx {
@@ -33,6 +36,13 @@ class BrowserViewRenderer {
virtual void OnNewPicture(
const base::android::JavaRef<jobject>& picture) = 0;
+ // Called to figure out, if the view is attached to the UI views
+ // hierarchy.
+ virtual bool isAttachedToViewHierarchy() = 0;
joth 2013/03/08 23:23:46 both these methods: leading capital letter in C++
mnaganov (inactive) 2013/03/11 14:39:20 This is what happens when you mix Java and C++ :(
+
+ // Called to get view's absolute location on the screen.
+ virtual gfx::Point getLocationOnScreen() = 0;
+
protected:
virtual ~Client() {}
};
@@ -67,6 +77,9 @@ class BrowserViewRenderer {
kOnNewPictureInvalidationOnly,
};
+ static BrowserViewRenderer* FromWebContents(
+ content::WebContents* web_contents);
+
// Content control methods.
virtual void SetContents(content::ContentViewCore* content_view_core) = 0;
@@ -87,6 +100,11 @@ class BrowserViewRenderer {
virtual void OnAttachedToWindow(int width, int height) = 0;
virtual void OnDetachedFromWindow() = 0;
+ // Android views hierarchy gluing.
+ virtual bool isViewVisible() = 0;
+ virtual bool isAttachedToViewHierarchy() = 0;
+ virtual gfx::Rect getScreenRect() = 0;
joth 2013/03/08 23:23:46 ditto
mnaganov (inactive) 2013/03/11 14:39:20 Done.
+
virtual ~BrowserViewRenderer() {}
};

Powered by Google App Engine
This is Rietveld 408576698