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

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

Issue 255023004: Add synchronous requestDrawGL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DCHECK 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 unified diff | Download patch | Annotate | Revision Log
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 base::android::ScopedJavaLocalRef<jbyteArray> GetCertificate( 93 base::android::ScopedJavaLocalRef<jbyteArray> GetCertificate(
94 JNIEnv* env, jobject obj); 94 JNIEnv* env, jobject obj);
95 void RequestNewHitTestDataAt(JNIEnv* env, jobject obj, jint x, jint y); 95 void RequestNewHitTestDataAt(JNIEnv* env, jobject obj, jint x, jint y);
96 void UpdateLastHitTestData(JNIEnv* env, jobject obj); 96 void UpdateLastHitTestData(JNIEnv* env, jobject obj);
97 void OnSizeChanged(JNIEnv* env, jobject obj, int w, int h, int ow, int oh); 97 void OnSizeChanged(JNIEnv* env, jobject obj, int w, int h, int ow, int oh);
98 void SetViewVisibility(JNIEnv* env, jobject obj, bool visible); 98 void SetViewVisibility(JNIEnv* env, jobject obj, bool visible);
99 void SetWindowVisibility(JNIEnv* env, jobject obj, bool visible); 99 void SetWindowVisibility(JNIEnv* env, jobject obj, bool visible);
100 void SetIsPaused(JNIEnv* env, jobject obj, bool paused); 100 void SetIsPaused(JNIEnv* env, jobject obj, bool paused);
101 void OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h); 101 void OnAttachedToWindow(JNIEnv* env, jobject obj, int w, int h);
102 void OnDetachedFromWindow(JNIEnv* env, jobject obj); 102 void OnDetachedFromWindow(JNIEnv* env, jobject obj);
103 void ReleaseHardwareDrawOnRenderThread(JNIEnv* env, jobject obj);
104 base::android::ScopedJavaLocalRef<jbyteArray> GetOpaqueState( 103 base::android::ScopedJavaLocalRef<jbyteArray> GetOpaqueState(
105 JNIEnv* env, jobject obj); 104 JNIEnv* env, jobject obj);
106 jboolean RestoreFromOpaqueState(JNIEnv* env, jobject obj, jbyteArray state); 105 jboolean RestoreFromOpaqueState(JNIEnv* env, jobject obj, jbyteArray state);
107 void FocusFirstNode(JNIEnv* env, jobject obj); 106 void FocusFirstNode(JNIEnv* env, jobject obj);
108 void SetBackgroundColor(JNIEnv* env, jobject obj, jint color); 107 void SetBackgroundColor(JNIEnv* env, jobject obj, jint color);
109 bool OnDraw(JNIEnv* env, 108 bool OnDraw(JNIEnv* env,
110 jobject obj, 109 jobject obj,
111 jobject canvas, 110 jobject canvas,
112 jboolean is_hardware_accelerated, 111 jboolean is_hardware_accelerated,
113 jint scroll_x, 112 jint scroll_x,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 const SkBitmap& bitmap) OVERRIDE; 155 const SkBitmap& bitmap) OVERRIDE;
157 virtual void OnReceivedTouchIconUrl(const std::string& url, 156 virtual void OnReceivedTouchIconUrl(const std::string& url,
158 const bool precomposed) OVERRIDE; 157 const bool precomposed) OVERRIDE;
159 158
160 // AwRenderViewHostExtClient implementation. 159 // AwRenderViewHostExtClient implementation.
161 virtual void OnWebLayoutPageScaleFactorChanged( 160 virtual void OnWebLayoutPageScaleFactorChanged(
162 float page_scale_factor) OVERRIDE; 161 float page_scale_factor) OVERRIDE;
163 virtual void OnWebLayoutContentsSizeChanged( 162 virtual void OnWebLayoutContentsSizeChanged(
164 const gfx::Size& contents_size) OVERRIDE; 163 const gfx::Size& contents_size) OVERRIDE;
165 164
166 // BrowserViewRenderer::Client implementation. 165 // BrowserViewRendererClient implementation.
167 virtual bool RequestDrawGL(jobject canvas) OVERRIDE; 166 virtual bool RequestDrawGL(jobject canvas, bool wait_for_completion) OVERRIDE;
168 virtual void PostInvalidate() OVERRIDE; 167 virtual void PostInvalidate() OVERRIDE;
169 virtual void OnNewPicture() OVERRIDE; 168 virtual void OnNewPicture() OVERRIDE;
170 virtual gfx::Point GetLocationOnScreen() OVERRIDE; 169 virtual gfx::Point GetLocationOnScreen() OVERRIDE;
171 virtual void SetMaxContainerViewScrollOffset( 170 virtual void SetMaxContainerViewScrollOffset(
172 gfx::Vector2d new_value) OVERRIDE; 171 gfx::Vector2d new_value) OVERRIDE;
173 virtual void ScrollContainerViewTo(gfx::Vector2d new_value) OVERRIDE; 172 virtual void ScrollContainerViewTo(gfx::Vector2d new_value) OVERRIDE;
174 virtual bool IsFlingActive() const OVERRIDE; 173 virtual bool IsFlingActive() const OVERRIDE;
175 virtual void SetPageScaleFactorAndLimits( 174 virtual void SetPageScaleFactorAndLimits(
176 float page_scale_factor, 175 float page_scale_factor,
177 float min_page_scale_factor, 176 float min_page_scale_factor,
(...skipping 12 matching lines...) Expand all
190 void SetFixedLayoutSize(JNIEnv* env, 189 void SetFixedLayoutSize(JNIEnv* env,
191 jobject obj, 190 jobject obj,
192 jint width_dip, 191 jint width_dip,
193 jint height_dip); 192 jint height_dip);
194 void SetSaveFormData(bool enabled); 193 void SetSaveFormData(bool enabled);
195 194
196 // Sets the java delegate 195 // Sets the java delegate
197 void SetAwAutofillManagerDelegate(jobject delegate); 196 void SetAwAutofillManagerDelegate(jobject delegate);
198 197
199 void SetJsOnlineProperty(JNIEnv* env, jobject obj, jboolean network_up); 198 void SetJsOnlineProperty(JNIEnv* env, jobject obj, jboolean network_up);
200 void TrimMemoryOnRenderThread(JNIEnv* env, 199 void TrimMemory(JNIEnv* env, jobject obj, jint level, jboolean visible);
201 jobject obj,
202 jint level,
203 jboolean visible);
204 200
205 private: 201 private:
206 void InitAutofillIfNecessary(bool enabled); 202 void InitAutofillIfNecessary(bool enabled);
207 void DidDrawGL(const DrawGLResult& result); 203 void DidDrawGL(const DrawGLResult& result);
208 void ForceFakeComposite(); 204 void ForceFakeComposite();
209 205
206 void InitializeHardwareDrawOnRenderThread();
207 void ReleaseHardwareDrawOnRenderThread();
208 void TrimMemoryOnRenderThread(int level, bool visible);
209
210 base::WeakPtrFactory<AwContents> weak_factory_on_ui_thread_; 210 base::WeakPtrFactory<AwContents> weak_factory_on_ui_thread_;
211 base::WeakPtr<AwContents> ui_thread_weak_ptr_; 211 base::WeakPtr<AwContents> ui_thread_weak_ptr_;
212 212
213 JavaObjectWeakGlobalRef java_ref_; 213 JavaObjectWeakGlobalRef java_ref_;
214 scoped_ptr<content::WebContents> web_contents_; 214 scoped_ptr<content::WebContents> web_contents_;
215 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; 215 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_;
216 scoped_ptr<AwContentsClientBridge> contents_client_bridge_; 216 scoped_ptr<AwContentsClientBridge> contents_client_bridge_;
217 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; 217 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_;
218 scoped_ptr<FindHelper> find_helper_; 218 scoped_ptr<FindHelper> find_helper_;
219 scoped_ptr<IconHelper> icon_helper_; 219 scoped_ptr<IconHelper> icon_helper_;
(...skipping 11 matching lines...) Expand all
231 std::list<OriginCallback> pending_geolocation_prompts_; 231 std::list<OriginCallback> pending_geolocation_prompts_;
232 232
233 DISALLOW_COPY_AND_ASSIGN(AwContents); 233 DISALLOW_COPY_AND_ASSIGN(AwContents);
234 }; 234 };
235 235
236 bool RegisterAwContents(JNIEnv* env); 236 bool RegisterAwContents(JNIEnv* env);
237 237
238 } // namespace android_webview 238 } // namespace android_webview
239 239
240 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ 240 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
OLDNEW
« no previous file with comments | « android_webview/java/src/org/chromium/android_webview/AwContents.java ('k') | android_webview/native/aw_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698