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. |
245 SharedRendererState* shared_renderer_state_; | 246 SharedRendererState* shared_renderer_state_; |
boliu
2014/10/28 19:49:43
At _some_ point in the future, we should be able t
hush (inactive)
2014/10/29 19:57:04
Yes, hopefully. Added a TODO here.
I guess one maj
boliu
2014/10/29 22:40:33
Yeah that's the idea I have in my head.
hush (inactive)
2014/10/30 00:46:36
filed https://code.google.com/p/chromium/issues/de
| |
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_; | 247 scoped_ptr<AwPdfExporter> pdf_exporter_; |
250 scoped_ptr<PermissionRequestHandler> permission_request_handler_; | 248 scoped_ptr<PermissionRequestHandler> permission_request_handler_; |
251 | 249 |
252 // GURL is supplied by the content layer as requesting frame. | 250 // GURL is supplied by the content layer as requesting frame. |
253 // Callback is supplied by the content layer, and is invoked with the result | 251 // Callback is supplied by the content layer, and is invoked with the result |
254 // from the permission prompt. | 252 // from the permission prompt. |
255 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; | 253 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; |
256 // The first element in the list is always the currently pending request. | 254 // The first element in the list is always the currently pending request. |
257 std::list<OriginCallback> pending_geolocation_prompts_; | 255 std::list<OriginCallback> pending_geolocation_prompts_; |
258 | 256 |
259 base::Lock render_thread_lock_; | 257 base::Lock render_thread_lock_; |
260 GLViewRendererManager::Key renderer_manager_key_; | 258 GLViewRendererManager::Key renderer_manager_key_; |
261 | 259 |
262 DISALLOW_COPY_AND_ASSIGN(AwContents); | 260 DISALLOW_COPY_AND_ASSIGN(AwContents); |
263 }; | 261 }; |
264 | 262 |
265 bool RegisterAwContents(JNIEnv* env); | 263 bool RegisterAwContents(JNIEnv* env); |
266 | 264 |
267 } // namespace android_webview | 265 } // namespace android_webview |
268 | 266 |
269 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 267 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
OLD | NEW |