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

Unified Diff: android_webview/native/aw_contents.h

Issue 817603002: cc: Make scheduling be driven by vsync for android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/native/aw_contents.h
diff --git a/android_webview/native/aw_contents.h b/android_webview/native/aw_contents.h
index 4a4afbbe981f25b935f9bc46690c6ee6b8fa4a4e..0b216dd57d1bef5de4d2d721539e06b42e9cb1d0 100644
--- a/android_webview/native/aw_contents.h
+++ b/android_webview/native/aw_contents.h
@@ -22,6 +22,7 @@
#include "base/android/scoped_java_ref.h"
#include "base/callback_forward.h"
#include "base/memory/scoped_ptr.h"
+#include "ui/base/android/window_android_observer.h"
class SkBitmap;
class TabContents;
@@ -58,7 +59,8 @@ class AwContents : public FindHelper::Listener,
public AwRenderViewHostExtClient,
public BrowserViewRendererClient,
public PermissionRequestHandlerClient,
- public AwBrowserPermissionRequestDelegate {
+ public AwBrowserPermissionRequestDelegate,
+ public WindowAndroidObserver {
public:
// Returns the AwContents instance associated with |web_contents|, or NULL.
static AwContents* FromWebContents(content::WebContents* web_contents);
@@ -203,9 +205,17 @@ class AwContents : public FindHelper::Listener,
float min_page_scale_factor,
float max_page_scale_factor) override;
virtual void DidOverscroll(gfx::Vector2d overscroll_delta) override;
+ virtual void RequestVSyncUpdate() override;
const BrowserViewRenderer* GetBrowserViewRenderer() const;
+ // WindowAndroidObserver implementation.
+ virtual void OnCompositingDidCommit() override {}
+ virtual void OnAttachCompositor() override {}
+ virtual void OnDetachCompositor() override {}
+ virtual void OnVSync(base::TimeTicks frame_time,
+ base::TimeDelta vsync_period) override;
+
void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files);
void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending);
jlong ReleasePopupAwContents(JNIEnv* env, jobject obj);

Powered by Google App Engine
This is Rietveld 408576698