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

Side by Side Diff: android_webview/browser/browser_view_renderer.h

Issue 23533051: [android_webview] Use a fraction to calculate scroll offset. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert changes from previous patch set as they break AwSettings tests Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | android_webview/browser/in_process_view_renderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ 6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
7 7
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "skia/ext/refptr.h" 9 #include "skia/ext/refptr.h"
10 #include "ui/gfx/point.h" 10 #include "ui/gfx/point.h"
(...skipping 30 matching lines...) Expand all
41 41
42 // Synchronously call back to SetGlobalVisibleRect with current value. 42 // Synchronously call back to SetGlobalVisibleRect with current value.
43 virtual void UpdateGlobalVisibleRect() = 0; 43 virtual void UpdateGlobalVisibleRect() = 0;
44 44
45 // Called to get view's absolute location on the screen. 45 // Called to get view's absolute location on the screen.
46 virtual gfx::Point GetLocationOnScreen() = 0; 46 virtual gfx::Point GetLocationOnScreen() = 0;
47 47
48 // Try to set the view's scroll offset to |new_value|. 48 // Try to set the view's scroll offset to |new_value|.
49 virtual void ScrollContainerViewTo(gfx::Vector2d new_value) = 0; 49 virtual void ScrollContainerViewTo(gfx::Vector2d new_value) = 0;
50 50
51 // Set the view's scroll offset cap to |new_value|.
52 virtual void SetMaxContainerViewScrollOffset(gfx::Vector2d new_value) = 0;
53
54 // Set the current page scale to |page_scale_factor|.
55 virtual void SetPageScaleFactor(float page_scale_factor) = 0;
56
57 // Set the current contents_size to |contents_size_dip|.
58 virtual void SetContentsSize(gfx::SizeF contents_size_dip) = 0;
59
51 // Handle overscroll. 60 // Handle overscroll.
52 virtual void DidOverscroll(gfx::Vector2d overscroll_delta) = 0; 61 virtual void DidOverscroll(gfx::Vector2d overscroll_delta) = 0;
53 62
54 protected: 63 protected:
55 virtual ~Client() {} 64 virtual ~Client() {}
56 }; 65 };
57 66
58 // Delegate to perform rendering actions involving Java objects. 67 // Delegate to perform rendering actions involving Java objects.
59 class JavaHelper { 68 class JavaHelper {
60 public: 69 public:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // View update notifications. 124 // View update notifications.
116 virtual void SetIsPaused(bool paused) = 0; 125 virtual void SetIsPaused(bool paused) = 0;
117 virtual void SetViewVisibility(bool visible) = 0; 126 virtual void SetViewVisibility(bool visible) = 0;
118 virtual void SetWindowVisibility(bool visible) = 0; 127 virtual void SetWindowVisibility(bool visible) = 0;
119 virtual void OnSizeChanged(int width, int height) = 0; 128 virtual void OnSizeChanged(int width, int height) = 0;
120 virtual void OnAttachedToWindow(int width, int height) = 0; 129 virtual void OnAttachedToWindow(int width, int height) = 0;
121 virtual void OnDetachedFromWindow() = 0; 130 virtual void OnDetachedFromWindow() = 0;
122 131
123 // Sets the scale for logical<->physical pixel conversions. 132 // Sets the scale for logical<->physical pixel conversions.
124 virtual void SetDipScale(float dip_scale) = 0; 133 virtual void SetDipScale(float dip_scale) = 0;
125 virtual void SetPageScaleFactor(float page_scale_factor) = 0;
126 134
127 // Set the root layer scroll offset to |new_value|. 135 // Set the root layer scroll offset to |new_value|.
128 virtual void ScrollTo(gfx::Vector2d new_value) = 0; 136 virtual void ScrollTo(gfx::Vector2d new_value) = 0;
129 137
130 // Android views hierarchy gluing. 138 // Android views hierarchy gluing.
131 virtual bool IsAttachedToWindow() = 0; 139 virtual bool IsAttachedToWindow() = 0;
132 virtual bool IsVisible() = 0; 140 virtual bool IsVisible() = 0;
133 virtual gfx::Rect GetScreenRect() = 0; 141 virtual gfx::Rect GetScreenRect() = 0;
134 142
135 virtual ~BrowserViewRenderer() {} 143 virtual ~BrowserViewRenderer() {}
136 }; 144 };
137 145
138 } // namespace android_webview 146 } // namespace android_webview
139 147
140 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ 148 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/in_process_view_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698