OLD | NEW |
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 <string> | 9 #include <string> |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // Returns the AwContents instance associated with |web_contents|, or NULL. | 45 // Returns the AwContents instance associated with |web_contents|, or NULL. |
46 static AwContents* FromWebContents(content::WebContents* web_contents); | 46 static AwContents* FromWebContents(content::WebContents* web_contents); |
47 | 47 |
48 AwContents(JNIEnv* env, | 48 AwContents(JNIEnv* env, |
49 jobject obj, | 49 jobject obj, |
50 jobject web_contents_delegate, | 50 jobject web_contents_delegate, |
51 bool private_browsing); | 51 bool private_browsing); |
52 virtual ~AwContents(); | 52 virtual ~AwContents(); |
53 | 53 |
54 void DrawGL(AwDrawGLInfo* draw_info); | 54 void DrawGL(AwDrawGLInfo* draw_info); |
55 bool DrawSW(JNIEnv* env, jobject obj, jobject canvas); | 55 bool DrawSW(JNIEnv* env, jobject obj, jobject canvas, jint scroll_x, |
| 56 jint scroll_y); |
56 | 57 |
57 void RunJavaScriptDialog( | 58 void RunJavaScriptDialog( |
58 content::JavaScriptMessageType message_type, | 59 content::JavaScriptMessageType message_type, |
59 const GURL& origin_url, | 60 const GURL& origin_url, |
60 const string16& message_text, | 61 const string16& message_text, |
61 const string16& default_prompt_text, | 62 const string16& default_prompt_text, |
62 const base::android::ScopedJavaLocalRef<jobject>& js_result); | 63 const base::android::ScopedJavaLocalRef<jobject>& js_result); |
63 | 64 |
64 void RunBeforeUnloadDialog( | 65 void RunBeforeUnloadDialog( |
65 const GURL& origin_url, | 66 const GURL& origin_url, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; | 140 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; |
140 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; | 141 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; |
141 scoped_ptr<FindHelper> find_helper_; | 142 scoped_ptr<FindHelper> find_helper_; |
142 scoped_ptr<content::WebContents> pending_contents_; | 143 scoped_ptr<content::WebContents> pending_contents_; |
143 | 144 |
144 // Compositor-specific state. | 145 // Compositor-specific state. |
145 scoped_ptr<content::Compositor> compositor_; | 146 scoped_ptr<content::Compositor> compositor_; |
146 scoped_refptr<cc::Layer> scissor_clip_layer_; | 147 scoped_refptr<cc::Layer> scissor_clip_layer_; |
147 scoped_refptr<cc::Layer> transform_layer_; | 148 scoped_refptr<cc::Layer> transform_layer_; |
148 scoped_refptr<cc::Layer> view_clip_layer_; | 149 scoped_refptr<cc::Layer> view_clip_layer_; |
| 150 gfx::Point hw_rendering_scroll_; |
149 gfx::Size view_size_; | 151 gfx::Size view_size_; |
150 bool view_visible_; | 152 bool view_visible_; |
151 bool compositor_visible_; | 153 bool compositor_visible_; |
152 bool is_composite_pending_; | 154 bool is_composite_pending_; |
153 int last_scroll_x_, last_scroll_y_; | |
154 | 155 |
155 // Used only for detecting Android View System context changes. | 156 // Used only for detecting Android View System context changes. |
156 // Not to be used between draw calls. | 157 // Not to be used between draw calls. |
157 EGLContext last_frame_context_; | 158 EGLContext last_frame_context_; |
158 | 159 |
159 DISALLOW_COPY_AND_ASSIGN(AwContents); | 160 DISALLOW_COPY_AND_ASSIGN(AwContents); |
160 }; | 161 }; |
161 | 162 |
162 bool RegisterAwContents(JNIEnv* env); | 163 bool RegisterAwContents(JNIEnv* env); |
163 | 164 |
164 } // namespace android_webview | 165 } // namespace android_webview |
165 | 166 |
166 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 167 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
OLD | NEW |