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 <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 // AwRenderViewHostExtClient implementation. | 185 // AwRenderViewHostExtClient implementation. |
186 virtual void OnWebLayoutPageScaleFactorChanged( | 186 virtual void OnWebLayoutPageScaleFactorChanged( |
187 float page_scale_factor) override; | 187 float page_scale_factor) override; |
188 virtual void OnWebLayoutContentsSizeChanged( | 188 virtual void OnWebLayoutContentsSizeChanged( |
189 const gfx::Size& contents_size) override; | 189 const gfx::Size& contents_size) override; |
190 | 190 |
191 // BrowserViewRendererClient implementation. | 191 // BrowserViewRendererClient implementation. |
192 virtual bool RequestDrawGL(bool wait_for_completion) override; | 192 virtual bool RequestDrawGL(bool wait_for_completion) override; |
193 virtual void PostInvalidate() override; | 193 virtual void PostInvalidate() override; |
| 194 virtual void InvalidateOnFunctorDestroy() override; |
194 virtual void UpdateParentDrawConstraints() override; | 195 virtual void UpdateParentDrawConstraints() override; |
195 virtual void DidSkipCommitFrame() override; | 196 virtual void DidSkipCommitFrame() override; |
196 virtual void OnNewPicture() override; | 197 virtual void OnNewPicture() override; |
197 virtual gfx::Point GetLocationOnScreen() override; | 198 virtual gfx::Point GetLocationOnScreen() override; |
198 virtual void ScrollContainerViewTo(gfx::Vector2d new_value) override; | 199 virtual void ScrollContainerViewTo(gfx::Vector2d new_value) override; |
199 virtual bool IsFlingActive() const override; | 200 virtual bool IsFlingActive() const override; |
200 virtual void UpdateScrollState(gfx::Vector2d max_scroll_offset, | 201 virtual void UpdateScrollState(gfx::Vector2d max_scroll_offset, |
201 gfx::SizeF contents_size_dip, | 202 gfx::SizeF contents_size_dip, |
202 float page_scale_factor, | 203 float page_scale_factor, |
203 float min_page_scale_factor, | 204 float min_page_scale_factor, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 scoped_ptr<content::WebContents> web_contents_; | 236 scoped_ptr<content::WebContents> web_contents_; |
236 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; | 237 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; |
237 scoped_ptr<AwContentsClientBridge> contents_client_bridge_; | 238 scoped_ptr<AwContentsClientBridge> contents_client_bridge_; |
238 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; | 239 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; |
239 scoped_ptr<FindHelper> find_helper_; | 240 scoped_ptr<FindHelper> find_helper_; |
240 scoped_ptr<IconHelper> icon_helper_; | 241 scoped_ptr<IconHelper> icon_helper_; |
241 scoped_ptr<AwContents> pending_contents_; | 242 scoped_ptr<AwContents> pending_contents_; |
242 BrowserViewRenderer browser_view_renderer_; | 243 BrowserViewRenderer browser_view_renderer_; |
243 // SharedRendererState is owned by BrowserViewRenderer. | 244 // SharedRendererState is owned by BrowserViewRenderer. |
244 // So keep a raw pointer here. | 245 // So keep a raw pointer here. |
| 246 // TODO(hush): remove this pointer from AwContents. |
245 SharedRendererState* shared_renderer_state_; | 247 SharedRendererState* shared_renderer_state_; |
246 // TODO(hush): hardware renderer will be owned by SharedRendererState, | |
247 // after DrawGL is moved to SharedRendererState. | |
248 scoped_ptr<HardwareRenderer> hardware_renderer_; | |
249 scoped_ptr<AwPdfExporter> pdf_exporter_; | 248 scoped_ptr<AwPdfExporter> pdf_exporter_; |
250 scoped_ptr<PermissionRequestHandler> permission_request_handler_; | 249 scoped_ptr<PermissionRequestHandler> permission_request_handler_; |
251 | 250 |
252 // GURL is supplied by the content layer as requesting frame. | 251 // GURL is supplied by the content layer as requesting frame. |
253 // Callback is supplied by the content layer, and is invoked with the result | 252 // Callback is supplied by the content layer, and is invoked with the result |
254 // from the permission prompt. | 253 // from the permission prompt. |
255 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; | 254 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; |
256 // The first element in the list is always the currently pending request. | 255 // The first element in the list is always the currently pending request. |
257 std::list<OriginCallback> pending_geolocation_prompts_; | 256 std::list<OriginCallback> pending_geolocation_prompts_; |
258 | 257 |
259 base::Lock render_thread_lock_; | 258 base::Lock render_thread_lock_; |
260 GLViewRendererManager::Key renderer_manager_key_; | 259 GLViewRendererManager::Key renderer_manager_key_; |
261 | 260 |
262 DISALLOW_COPY_AND_ASSIGN(AwContents); | 261 DISALLOW_COPY_AND_ASSIGN(AwContents); |
263 }; | 262 }; |
264 | 263 |
265 bool RegisterAwContents(JNIEnv* env); | 264 bool RegisterAwContents(JNIEnv* env); |
266 | 265 |
267 } // namespace android_webview | 266 } // namespace android_webview |
268 | 267 |
269 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 268 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
OLD | NEW |