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

Unified Diff: android_webview/browser/browser_view_renderer.h

Issue 256303006: Make LayerScrollOffsetDelegate updates consistent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
« no previous file with comments | « no previous file | android_webview/browser/browser_view_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/browser_view_renderer.h
diff --git a/android_webview/browser/browser_view_renderer.h b/android_webview/browser/browser_view_renderer.h
index 991075f3acf6e6cb35619cdfa437b821ec00a0ee..9487a3e4a9517a6613c601d5a3ab2307fef201bf 100644
--- a/android_webview/browser/browser_view_renderer.h
+++ b/android_webview/browser/browser_view_renderer.h
@@ -11,6 +11,7 @@
#include "base/android/scoped_java_ref.h"
#include "base/callback.h"
#include "base/cancelable_callback.h"
+#include "base/values.h"
#include "content/public/browser/android/synchronous_compositor_client.h"
#include "skia/ext/refptr.h"
#include "ui/gfx/rect.h"
@@ -120,17 +121,16 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient,
virtual void DidDestroyCompositor(content::SynchronousCompositor* compositor)
OVERRIDE;
virtual void SetContinuousInvalidate(bool invalidate) OVERRIDE;
- virtual void SetMaxRootLayerScrollOffset(gfx::Vector2dF new_value) OVERRIDE;
- virtual void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value_css)
- OVERRIDE;
virtual void DidUpdateContent() OVERRIDE;
virtual gfx::Vector2dF GetTotalRootLayerScrollOffset() OVERRIDE;
+ virtual void UpdateRootLayerState(
+ const gfx::Vector2dF& total_scroll_offset_dip,
+ const gfx::Vector2dF& max_scroll_offset_dip,
+ const gfx::SizeF& scrollable_size_dip,
+ float page_scale_factor,
+ float min_page_scale_factor,
+ float max_page_scale_factor) OVERRIDE;
virtual bool IsExternalFlingActive() const OVERRIDE;
- virtual void SetRootLayerPageScaleFactorAndLimits(float page_scale_factor,
- float min_page_scale_factor,
- float max_page_scale_factor)
- OVERRIDE;
- virtual void SetRootLayerScrollableSize(gfx::SizeF scrollable_size) OVERRIDE;
virtual void DidOverscroll(gfx::Vector2dF accumulated_overscroll,
gfx::Vector2dF latest_overscroll_delta,
gfx::Vector2dF current_fling_velocity) OVERRIDE;
@@ -141,6 +141,7 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient,
bool effective_immediately) OVERRIDE;
private:
+ void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value_dip);
// Checks the continuous invalidate and block invalidate state, and schedule
// invalidates appropriately. If |force_invalidate| is true, then send a view
// invalidate regardless of compositor expectation.
@@ -148,6 +149,9 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient,
bool DrawSWInternal(jobject java_canvas, const gfx::Rect& clip_bounds);
bool CompositeSW(SkCanvas* canvas);
void DidComposite(bool force_invalidate);
+ scoped_ptr<base::Value> RootLayerStateAsValue(
+ const gfx::Vector2dF& total_scroll_offset_dip,
+ const gfx::SizeF& scrollable_size_dip);
// If we call up view invalidate and OnDraw is not called before a deadline,
// then we keep ticking the SynchronousCompositor so it can make progress.
« no previous file with comments | « no previous file | android_webview/browser/browser_view_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698