Chromium Code Reviews| Index: android_webview/browser/in_process_renderer/in_process_view_renderer.h |
| diff --git a/android_webview/browser/in_process_renderer/in_process_view_renderer.h b/android_webview/browser/in_process_renderer/in_process_view_renderer.h |
| index d2c0c24d1ac27e380765fed9675f27b868760cc7..6bb029b16e6dbef55822cd7ce6113e77e824d343 100644 |
| --- a/android_webview/browser/in_process_renderer/in_process_view_renderer.h |
| +++ b/android_webview/browser/in_process_renderer/in_process_view_renderer.h |
| @@ -11,30 +11,70 @@ |
| namespace content { |
| class SynchronousCompositor; |
| +class WebContents; |
| } |
| namespace android_webview { |
| // Provides RenderViewHost wrapper functionality for sending WebView-specific |
| // IPC messages to the renderer and from there to WebKit. |
| -class InProcessViewRenderer : public BrowserViewRendererImpl, |
| +class InProcessViewRenderer : public BrowserViewRenderer, |
| public content::SynchronousCompositorClient { |
| public: |
| InProcessViewRenderer(BrowserViewRenderer::Client* client, |
| JavaHelper* java_helper); |
| virtual ~InProcessViewRenderer(); |
| + static InProcessViewRenderer* FromWebContents( |
| + content::WebContents* contents); |
| + static InProcessViewRenderer* FromId( |
| + int render_process_id, int render_view_id); |
| + void BindSynchronousCompositor( |
| + content::SynchronousCompositor* compositor); |
| + |
| // BrowserViewRenderer overrides |
| - virtual void BindSynchronousCompositor( |
| - content::SynchronousCompositor* compositor) OVERRIDE; |
| - virtual bool RenderPicture(SkCanvas* canvas) OVERRIDE; |
| + virtual void SetContents( |
| + content::ContentViewCore* content_view_core) OVERRIDE; |
| + virtual void DrawGL(AwDrawGLInfo* draw_info) OVERRIDE; |
| + virtual void SetScrollForHWFrame(int x, int y) OVERRIDE; |
| + virtual bool DrawSW(jobject java_canvas, |
| + const gfx::Rect& clip_bounds) OVERRIDE; |
| + virtual base::android::ScopedJavaLocalRef<jobject> CapturePicture() OVERRIDE; |
| + virtual void EnableOnNewPicture(bool enabled) OVERRIDE; |
| + virtual void OnVisibilityChanged( |
| + bool view_visible, bool window_visible) OVERRIDE; |
| + virtual void OnSizeChanged(int width, int height) OVERRIDE; |
| + virtual void OnAttachedToWindow(int width, int height) OVERRIDE; |
| + virtual void OnDetachedFromWindow() OVERRIDE; |
| + virtual bool IsAttachedToWindow() OVERRIDE; |
| + virtual bool IsViewVisible() OVERRIDE; |
| + virtual gfx::Rect GetScreenRect() OVERRIDE; |
| // SynchronousCompositorClient overrides |
| - virtual void DidDestroyCompositor( |
| + virtual void DidDestroyCompositor( |
| content::SynchronousCompositor* compositor) OVERRIDE; |
| + virtual void SetContinuousInvalidate(bool invalidate) OVERRIDE; |
| + |
| + void WebContentsGone(); |
| private: |
| + void Invalidate(); |
| + bool RenderPicture(SkCanvas* canvas); |
| + |
| + content::WebContents* web_contents_; |
| content::SynchronousCompositor* compositor_; |
| + BrowserViewRenderer::Client* client_; |
| + |
| + bool view_visible_; |
| + bool inside_draw_; |
| + bool continuous_invalidate_; |
|
joth
2013/05/09 10:48:52
comments on these three would be helpful
|
| + |
| + // Used only for detecting Android View System context changes. |
| + // Not to be used between draw calls. |
| + EGLContext last_frame_context_; |
| + |
| + // Last View scroll before hardware rendering is triggered. |
| + gfx::Point hw_rendering_scroll_; |
| DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer); |
| }; |