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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.h

Issue 14268004: Add overscroll edge effect animations for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review. Properly disable animation on loss of focus. Created 7 years, 8 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: content/browser/renderer_host/render_widget_host_view_android.h
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h
index 0a04ba119f1728687c4a996286777e6b91b74f15..8bbc8b0184e7f9e2bb65f598a3679c110b6c9713 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -40,6 +40,7 @@ class WebMouseEvent;
namespace content {
class ContentViewCoreImpl;
+class OverscrollGlow;
class RenderWidgetHost;
class RenderWidgetHostImpl;
class SurfaceTextureTransportClient;
@@ -147,6 +148,9 @@ class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase,
virtual void HasTouchEventHandlers(bool need_touch_events) OVERRIDE;
virtual void OnSwapCompositorFrame(
scoped_ptr<cc::CompositorFrame> frame) OVERRIDE;
+ virtual void OnOverscrolled(const gfx::Vector2dF& accumulated_overscroll,
+ const gfx::Vector2dF& current_fling_velocity)
+ OVERRIDE;
virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect,
const SkBitmap& zoomed_bitmap) OVERRIDE;
@@ -192,6 +196,14 @@ class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase,
void RunAckCallbacks();
+ void RequestVSyncNotificationsIfNecessary();
+
+ void AttachLayers();
+ void RemoveLayers();
+
+ void Animate();
+ void ScheduleAnimation();
+
// The model object.
RenderWidgetHostImpl* host_;
@@ -199,7 +211,7 @@ class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase,
// This view may not actually be attached if this is true, but it should be
// treated as such, because as soon as a ContentViewCore is set the layer
// will be attached automatically.
- bool is_layer_attached_;
+ bool are_layers_attached_;
// ContentViewCoreImpl is our interface to the view system.
ContentViewCoreImpl* content_view_core_;
@@ -236,6 +248,13 @@ class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase,
std::queue<base::Closure> ack_callbacks_;
+ bool vsync_notifications_enabled_;
+ bool animation_vsync_notifications_enabled_;
+ bool renderer_vsync_notifications_enabled_;
+
+ // Used to render overscroll overlays
+ scoped_ptr<OverscrollGlow> overscroll_effect_;
+
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
};

Powered by Google App Engine
This is Rietveld 408576698