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

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: Rebase Created 7 years, 7 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 8a50861266f4515e02637d3bd0800f0e8a3a114a..98740c70b5b928cbd6c30775a92b64caac120b24 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -43,6 +43,7 @@ class WebMouseEvent;
namespace content {
class ContentViewCoreImpl;
+class OverscrollGlow;
class RenderWidgetHost;
class RenderWidgetHostImpl;
class SurfaceTextureTransportClient;
@@ -152,6 +153,9 @@ class RenderWidgetHostViewAndroid
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;
virtual SmoothScrollGesture* CreateSmoothScrollGesture(
@@ -198,6 +202,8 @@ class RenderWidgetHostViewAndroid
void RequestContentClipping(const gfx::Rect& clipping,
const gfx::Size& content_size);
+ void Animate(base::TimeTicks frame_time);
+
private:
void BuffersSwapped(const gpu::Mailbox& mailbox,
const base::Closure& ack_callback);
@@ -211,6 +217,12 @@ class RenderWidgetHostViewAndroid
void ResetClipping();
void ClipContents(const gfx::Rect& clipping, const gfx::Size& content_size);
+ void AttachLayers();
+ void RemoveLayers();
+
+ void UpdateAnimationSize(const cc::CompositorFrame* frame);
+ void ScheduleAnimationIfNecessary();
+
// The model object.
RenderWidgetHostImpl* host_;
@@ -218,7 +230,7 @@ class RenderWidgetHostViewAndroid
// 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_;
@@ -260,6 +272,9 @@ class RenderWidgetHostViewAndroid
std::queue<base::Closure> ack_callbacks_;
+ // Used to render overscroll overlays
Sami 2013/05/10 10:47:57 Nit: end comments with a period.
jdduke (slow) 2013/05/10 16:39:52 Done.
+ scoped_ptr<OverscrollGlow> overscroll_effect_;
+
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
};

Powered by Google App Engine
This is Rietveld 408576698