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_IN_PROCESS_VIEW_RENDERER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ |
7 | 7 |
8 #include "android_webview/browser/browser_view_renderer.h" | 8 #include "android_webview/browser/browser_view_renderer.h" |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 content::WebContents* contents); | 35 content::WebContents* contents); |
36 | 36 |
37 // BrowserViewRenderer overrides | 37 // BrowserViewRenderer overrides |
38 virtual bool OnDraw(jobject java_canvas, | 38 virtual bool OnDraw(jobject java_canvas, |
39 bool is_hardware_canvas, | 39 bool is_hardware_canvas, |
40 const gfx::Vector2d& scroll_, | 40 const gfx::Vector2d& scroll_, |
41 const gfx::Rect& clip) OVERRIDE; | 41 const gfx::Rect& clip) OVERRIDE; |
42 virtual void DrawGL(AwDrawGLInfo* draw_info) OVERRIDE; | 42 virtual void DrawGL(AwDrawGLInfo* draw_info) OVERRIDE; |
43 virtual base::android::ScopedJavaLocalRef<jobject> CapturePicture() OVERRIDE; | 43 virtual base::android::ScopedJavaLocalRef<jobject> CapturePicture() OVERRIDE; |
44 virtual void EnableOnNewPicture(bool enabled) OVERRIDE; | 44 virtual void EnableOnNewPicture(bool enabled) OVERRIDE; |
45 virtual void OnVisibilityChanged( | 45 virtual void OnVisibilityChanged(bool visible) OVERRIDE; |
46 bool view_visible, bool window_visible) OVERRIDE; | |
47 virtual void OnSizeChanged(int width, int height) OVERRIDE; | 46 virtual void OnSizeChanged(int width, int height) OVERRIDE; |
48 virtual void ScrollTo(gfx::Vector2d new_value) OVERRIDE; | 47 virtual void ScrollTo(gfx::Vector2d new_value) OVERRIDE; |
49 virtual void OnAttachedToWindow(int width, int height) OVERRIDE; | 48 virtual void OnAttachedToWindow(int width, int height) OVERRIDE; |
50 virtual void OnDetachedFromWindow() OVERRIDE; | 49 virtual void OnDetachedFromWindow() OVERRIDE; |
51 virtual void SetDipScale(float dip_scale) OVERRIDE; | 50 virtual void SetDipScale(float dip_scale) OVERRIDE; |
52 virtual bool IsAttachedToWindow() OVERRIDE; | 51 virtual bool IsAttachedToWindow() OVERRIDE; |
53 virtual bool IsViewVisible() OVERRIDE; | 52 virtual bool IsViewVisible() OVERRIDE; |
54 virtual gfx::Rect GetScreenRect() OVERRIDE; | 53 virtual gfx::Rect GetScreenRect() OVERRIDE; |
55 | 54 |
56 // SynchronousCompositorClient overrides | 55 // SynchronousCompositorClient overrides |
(...skipping 13 matching lines...) Expand all Loading... |
70 bool DrawSWInternal(jobject java_canvas, | 69 bool DrawSWInternal(jobject java_canvas, |
71 const gfx::Rect& clip_bounds); | 70 const gfx::Rect& clip_bounds); |
72 bool RenderSW(SkCanvas* canvas); | 71 bool RenderSW(SkCanvas* canvas); |
73 bool CompositeSW(SkCanvas* canvas); | 72 bool CompositeSW(SkCanvas* canvas); |
74 | 73 |
75 BrowserViewRenderer::Client* client_; | 74 BrowserViewRenderer::Client* client_; |
76 BrowserViewRenderer::JavaHelper* java_helper_; | 75 BrowserViewRenderer::JavaHelper* java_helper_; |
77 content::WebContents* web_contents_; | 76 content::WebContents* web_contents_; |
78 content::SynchronousCompositor* compositor_; | 77 content::SynchronousCompositor* compositor_; |
79 | 78 |
80 bool view_visible_; | 79 bool visible_; |
81 float dip_scale_; | 80 float dip_scale_; |
82 | 81 |
83 // When true, we should continuously invalidate and keep drawing, for example | 82 // When true, we should continuously invalidate and keep drawing, for example |
84 // to drive animation. | 83 // to drive animation. |
85 bool continuous_invalidate_; | 84 bool continuous_invalidate_; |
86 // Used to block additional invalidates while one is already pending or before | 85 // Used to block additional invalidates while one is already pending or before |
87 // compositor draw which may switch continuous_invalidate on and off in the | 86 // compositor draw which may switch continuous_invalidate on and off in the |
88 // process. | 87 // process. |
89 bool block_invalidates_; | 88 bool block_invalidates_; |
90 | 89 |
(...skipping 13 matching lines...) Expand all Loading... |
104 | 103 |
105 // Current scroll offset in CSS pixels. | 104 // Current scroll offset in CSS pixels. |
106 gfx::Vector2dF scroll_offset_css_; | 105 gfx::Vector2dF scroll_offset_css_; |
107 | 106 |
108 DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer); | 107 DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer); |
109 }; | 108 }; |
110 | 109 |
111 } // namespace android_webview | 110 } // namespace android_webview |
112 | 111 |
113 #endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ | 112 #endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ |
OLD | NEW |