Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_IN_PROCESS_VIEW_RENDERER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_IN_PROCESS_VIEW_RENDERER_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_IN_PROCESS_VIEW_RENDERER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_IN_PROCESS_VIEW_RENDERER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "android_webview/browser/browser_view_renderer.h" | 10 #include "android_webview/browser/browser_view_renderer.h" |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 public content::SynchronousCompositorClient { | 29 public content::SynchronousCompositorClient { |
| 30 public: | 30 public: |
| 31 InProcessViewRenderer(BrowserViewRenderer::Client* client, | 31 InProcessViewRenderer(BrowserViewRenderer::Client* client, |
| 32 JavaHelper* java_helper, | 32 JavaHelper* java_helper, |
| 33 content::WebContents* web_contents); | 33 content::WebContents* web_contents); |
| 34 virtual ~InProcessViewRenderer(); | 34 virtual ~InProcessViewRenderer(); |
| 35 | 35 |
| 36 static InProcessViewRenderer* FromWebContents( | 36 static InProcessViewRenderer* FromWebContents( |
| 37 content::WebContents* contents); | 37 content::WebContents* contents); |
| 38 | 38 |
| 39 // TODO(joth): consider extracting this to its own utility class. | |
|
joth
2013/08/03 17:38:12
I left in this .h/.cc for this patch as it makes t
| |
| 40 typedef base::Callback<bool(SkCanvas*)> RenderMethod; | |
| 41 static bool RenderViaAuxilaryBitmapIfNeeded( | |
| 42 jobject java_canvas, | |
| 43 JavaHelper* java_helper, | |
| 44 const gfx::Vector2d& scroll_correction, | |
| 45 const gfx::Rect& clip, | |
| 46 RenderMethod render_source, | |
| 47 void* owner_key); | |
| 48 | |
| 39 // BrowserViewRenderer overrides | 49 // BrowserViewRenderer overrides |
| 40 virtual bool OnDraw(jobject java_canvas, | 50 virtual bool OnDraw(jobject java_canvas, |
| 41 bool is_hardware_canvas, | 51 bool is_hardware_canvas, |
| 42 const gfx::Vector2d& scroll_, | 52 const gfx::Vector2d& scroll_, |
| 43 const gfx::Rect& clip) OVERRIDE; | 53 const gfx::Rect& clip) OVERRIDE; |
| 44 virtual void DrawGL(AwDrawGLInfo* draw_info) OVERRIDE; | 54 virtual void DrawGL(AwDrawGLInfo* draw_info) OVERRIDE; |
| 45 virtual void SetGlobalVisibleRect(const gfx::Rect& visible_rect) OVERRIDE; | 55 virtual void SetGlobalVisibleRect(const gfx::Rect& visible_rect) OVERRIDE; |
| 46 virtual base::android::ScopedJavaLocalRef<jobject> CapturePicture( | 56 virtual skia::RefPtr<SkPicture> CapturePicture(int width, |
| 47 int width, | 57 int height) OVERRIDE; |
| 48 int height) OVERRIDE; | |
| 49 virtual void EnableOnNewPicture(bool enabled) OVERRIDE; | 58 virtual void EnableOnNewPicture(bool enabled) OVERRIDE; |
| 50 virtual void OnVisibilityChanged(bool visible) OVERRIDE; | 59 virtual void OnVisibilityChanged(bool visible) OVERRIDE; |
| 51 virtual void OnSizeChanged(int width, int height) OVERRIDE; | 60 virtual void OnSizeChanged(int width, int height) OVERRIDE; |
| 52 virtual void ScrollTo(gfx::Vector2d new_value) OVERRIDE; | 61 virtual void ScrollTo(gfx::Vector2d new_value) OVERRIDE; |
| 53 virtual void SetPageScaleFactor(float page_scale_factor) OVERRIDE; | 62 virtual void SetPageScaleFactor(float page_scale_factor) OVERRIDE; |
| 54 virtual void OnAttachedToWindow(int width, int height) OVERRIDE; | 63 virtual void OnAttachedToWindow(int width, int height) OVERRIDE; |
| 55 virtual void OnDetachedFromWindow() OVERRIDE; | 64 virtual void OnDetachedFromWindow() OVERRIDE; |
| 56 virtual void SetDipScale(float dip_scale) OVERRIDE; | 65 virtual void SetDipScale(float dip_scale) OVERRIDE; |
| 57 virtual bool IsAttachedToWindow() OVERRIDE; | 66 virtual bool IsAttachedToWindow() OVERRIDE; |
| 58 virtual bool IsViewVisible() OVERRIDE; | 67 virtual bool IsViewVisible() OVERRIDE; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 147 gfx::Vector2dF overscroll_rounding_error_; | 156 gfx::Vector2dF overscroll_rounding_error_; |
| 148 | 157 |
| 149 GLViewRendererManager::Key manager_key_; | 158 GLViewRendererManager::Key manager_key_; |
| 150 | 159 |
| 151 DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer); | 160 DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer); |
| 152 }; | 161 }; |
| 153 | 162 |
| 154 } // namespace android_webview | 163 } // namespace android_webview |
| 155 | 164 |
| 156 #endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_VIEW_RENDERER_H_ | 165 #endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_VIEW_RENDERER_H_ |
| OLD | NEW |