| 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 f4a52cde5e1d99f36d9624ecc0c27c9bf9597a24..c82bb86e628e371f5b6d7138fc7d7c55bdd69d71 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_android.h
|
| +++ b/content/browser/renderer_host/render_widget_host_view_android.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/i18n/rtl.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/process.h"
|
| +#include "base/timer.h"
|
| #include "content/browser/renderer_host/ime_adapter_android.h"
|
| #include "content/browser/renderer_host/render_widget_host_view_base.h"
|
| #include "gpu/command_buffer/common/mailbox.h"
|
| @@ -38,6 +39,7 @@ class WebMouseEvent;
|
|
|
| namespace content {
|
| class ContentViewCoreImpl;
|
| +class OverscrollGlow;
|
| class RenderWidgetHost;
|
| class RenderWidgetHostImpl;
|
| class SurfaceTextureTransportClient;
|
| @@ -152,6 +154,9 @@ class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase {
|
| const gfx::Vector2dF& controls_offset,
|
| const gfx::Vector2dF& content_offset,
|
| float overdraw_bottom_height) 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;
|
|
|
| @@ -167,6 +172,7 @@ class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase {
|
| void OnProcessImeBatchStateAck(bool is_begin);
|
| void OnDidChangeBodyBackgroundColor(SkColor color);
|
| void OnStartContentIntent(const GURL& content_url);
|
| + void OnSetOverscrollResources();
|
|
|
| int GetNativeImeAdapter();
|
|
|
| @@ -187,6 +193,14 @@ class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase {
|
| const gfx::Size texture_size,
|
| const gfx::SizeF content_size,
|
| const base::Closure& ack_callback);
|
| + void AttachLayers();
|
| + void RemoveLayers();
|
| +
|
| + void SetOverscrollEffect(scoped_ptr<OverscrollGlow> overscroll_effect);
|
| + void AnimationCallback();
|
| + void AnimateIfNeeded();
|
| +
|
| + enum { kDesiredAnimationIntervalInMs = 16 };
|
|
|
| // The model object.
|
| RenderWidgetHostImpl* host_;
|
| @@ -195,7 +209,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_;
|
| @@ -208,9 +222,7 @@ class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase {
|
| // The texture layer for this view when using browser-side compositing.
|
| scoped_refptr<cc::TextureLayer> texture_layer_;
|
|
|
| - // The layer used for rendering the contents of this view.
|
| - // It is either owned by texture_layer_ or surface_texture_transport_
|
| - // depending on the mode.
|
| + // Layer used for rendering the contents of this view.
|
| scoped_refptr<cc::Layer> layer_;
|
|
|
| // The most recent texture id that was pushed to the texture layer.
|
| @@ -228,6 +240,11 @@ class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase {
|
| // The mailbox of the frame we last returned.
|
| gpu::Mailbox last_mailbox_;
|
|
|
| + // Used to render overscroll overlays
|
| + bool overscroll_resources_updated_;
|
| + scoped_ptr<OverscrollGlow> overscroll_effect_;
|
| + base::OneShotTimer<RenderWidgetHostViewAndroid> animation_timer_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
|
| };
|
|
|
|
|