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

Side by Side Diff: android_webview/native/aw_contents.h

Issue 1063853005: Unify Android Webview and Chrome's fling (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: add a todo Created 5 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_NATIVE_AW_CONTENTS_H_ 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ 6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <list> 9 #include <list>
10 #include <string> 10 #include <string>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void SetViewVisibility(JNIEnv* env, jobject obj, bool visible); 111 void SetViewVisibility(JNIEnv* env, jobject obj, bool visible);
112 void SetWindowVisibility(JNIEnv* env, jobject obj, bool visible); 112 void SetWindowVisibility(JNIEnv* env, jobject obj, bool visible);
113 void SetIsPaused(JNIEnv* env, jobject obj, bool paused); 113 void SetIsPaused(JNIEnv* env, jobject obj, bool paused);
114 void OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h); 114 void OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h);
115 void OnDetachedFromWindow(JNIEnv* env, jobject obj); 115 void OnDetachedFromWindow(JNIEnv* env, jobject obj);
116 base::android::ScopedJavaLocalRef<jbyteArray> GetOpaqueState( 116 base::android::ScopedJavaLocalRef<jbyteArray> GetOpaqueState(
117 JNIEnv* env, jobject obj); 117 JNIEnv* env, jobject obj);
118 jboolean RestoreFromOpaqueState(JNIEnv* env, jobject obj, jbyteArray state); 118 jboolean RestoreFromOpaqueState(JNIEnv* env, jobject obj, jbyteArray state);
119 void FocusFirstNode(JNIEnv* env, jobject obj); 119 void FocusFirstNode(JNIEnv* env, jobject obj);
120 void SetBackgroundColor(JNIEnv* env, jobject obj, jint color); 120 void SetBackgroundColor(JNIEnv* env, jobject obj, jint color);
121 void OnComputeScroll(JNIEnv* env, jobject obj, jlong animation_time_millis);
121 bool OnDraw(JNIEnv* env, 122 bool OnDraw(JNIEnv* env,
122 jobject obj, 123 jobject obj,
123 jobject canvas, 124 jobject canvas,
124 jboolean is_hardware_accelerated, 125 jboolean is_hardware_accelerated,
125 jint scroll_x, 126 jint scroll_x,
126 jint scroll_y, 127 jint scroll_y,
127 jint visible_left, 128 jint visible_left,
128 jint visible_top, 129 jint visible_top,
129 jint visible_right, 130 jint visible_right,
130 jint visible_bottom); 131 jint visible_bottom);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 void OnWebLayoutPageScaleFactorChanged(float page_scale_factor) override; 193 void OnWebLayoutPageScaleFactorChanged(float page_scale_factor) override;
193 void OnWebLayoutContentsSizeChanged(const gfx::Size& contents_size) override; 194 void OnWebLayoutContentsSizeChanged(const gfx::Size& contents_size) override;
194 195
195 // BrowserViewRendererClient implementation. 196 // BrowserViewRendererClient implementation.
196 bool RequestDrawGL(bool wait_for_completion) override; 197 bool RequestDrawGL(bool wait_for_completion) override;
197 void PostInvalidate() override; 198 void PostInvalidate() override;
198 void DetachFunctorFromView() override; 199 void DetachFunctorFromView() override;
199 void OnNewPicture() override; 200 void OnNewPicture() override;
200 gfx::Point GetLocationOnScreen() override; 201 gfx::Point GetLocationOnScreen() override;
201 void ScrollContainerViewTo(gfx::Vector2d new_value) override; 202 void ScrollContainerViewTo(gfx::Vector2d new_value) override;
202 bool IsFlingActive() const override; 203 bool IsSmoothScrollingActive() const override;
203 void UpdateScrollState(gfx::Vector2d max_scroll_offset, 204 void UpdateScrollState(gfx::Vector2d max_scroll_offset,
204 gfx::SizeF contents_size_dip, 205 gfx::SizeF contents_size_dip,
205 float page_scale_factor, 206 float page_scale_factor,
206 float min_page_scale_factor, 207 float min_page_scale_factor,
207 float max_page_scale_factor) override; 208 float max_page_scale_factor) override;
208 void DidOverscroll(gfx::Vector2d overscroll_delta) override; 209 void DidOverscroll(gfx::Vector2d overscroll_delta,
210 gfx::Vector2dF overscroll_velocity) override;
211
209 void ParentDrawConstraintsUpdated( 212 void ParentDrawConstraintsUpdated(
210 const ParentCompositorDrawConstraints& draw_constraints) override {} 213 const ParentCompositorDrawConstraints& draw_constraints) override {}
211 214
212 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files); 215 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files);
213 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending); 216 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending);
214 jlong ReleasePopupAwContents(JNIEnv* env, jobject obj); 217 jlong ReleasePopupAwContents(JNIEnv* env, jobject obj);
215 218
216 void ScrollTo(JNIEnv* env, jobject obj, jint x, jint y); 219 void ScrollTo(JNIEnv* env, jobject obj, jint x, jint y);
217 void SetDipScale(JNIEnv* env, jobject obj, jfloat dip_scale); 220 void SetDipScale(JNIEnv* env, jobject obj, jfloat dip_scale);
218 void SetSaveFormData(bool enabled); 221 void SetSaveFormData(bool enabled);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 GLViewRendererManager::Key renderer_manager_key_; 264 GLViewRendererManager::Key renderer_manager_key_;
262 265
263 DISALLOW_COPY_AND_ASSIGN(AwContents); 266 DISALLOW_COPY_AND_ASSIGN(AwContents);
264 }; 267 };
265 268
266 bool RegisterAwContents(JNIEnv* env); 269 bool RegisterAwContents(JNIEnv* env);
267 270
268 } // namespace android_webview 271 } // namespace android_webview
269 272
270 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ 273 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698