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

Unified Diff: content/public/browser/web_contents_delegate.h

Issue 10828356: Very basic Android browser-side compositing support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « content/public/browser/android/graphics_context.h ('k') | content/shell/android/draw_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/web_contents_delegate.h
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 5a339aec3d06e456acf4cd0e72c0c92ab85b4295..b4cb57b78eec43a0e57369a654f25e9ff1198136 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -57,6 +57,10 @@ struct WebIntentData;
struct WebIntentServiceData;
}
+namespace WebKit {
+class WebLayer;
+}
+
namespace content {
struct OpenURLParams;
@@ -307,12 +311,6 @@ class CONTENT_EXPORT WebContentsDelegate {
// changed.
virtual void ContentRestrictionsChanged(WebContents* source) {}
-#if defined(OS_ANDROID)
- // Returns true if the delegate wants to handle the url instead. Default
- // returns false.
- virtual bool ShouldOverrideLoading(const GURL& url);
-#endif
-
// Notification that the tab is hung.
virtual void RendererUnresponsive(WebContents* source) {}
@@ -428,6 +426,22 @@ class CONTENT_EXPORT WebContentsDelegate {
const MediaStreamRequest* request,
const MediaResponseCallback& callback) {}
+#if defined(OS_ANDROID)
+ // Returns true if the delegate wants to handle the url instead. Default
+ // returns false.
+ virtual bool ShouldOverrideLoading(const GURL& url);
+
+ // Called when a compositing layer becomes available for this web contents
+ // so the delegate can add it to the layer tree.
+ virtual void AttachLayer(WebContents* web_contents,
+ WebKit::WebLayer* layer) {}
+
+ // Called before a compositing layer becomes invalid so the delegate can
+ // remove it from the layer tree.
+ virtual void RemoveLayer(WebContents* web_contents,
+ WebKit::WebLayer* layer) {}
+#endif
+
protected:
virtual ~WebContentsDelegate();
« no previous file with comments | « content/public/browser/android/graphics_context.h ('k') | content/shell/android/draw_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698