| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_BROWSER_VIEW_RENDERER_IMPL_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_IMPL_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_IMPL_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_IMPL_H_ |
| 7 | 7 |
| 8 #include "android_webview/browser/browser_view_renderer.h" | 8 #include "android_webview/browser/browser_view_renderer.h" |
| 9 #include "android_webview/browser/renderer_host/view_renderer_host.h" | 9 #include "android_webview/browser/renderer_host/view_renderer_host.h" |
| 10 #include "content/public/browser/android/compositor.h" | 10 #include "content/public/browser/android/compositor.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 virtual void DrawGL(AwDrawGLInfo* draw_info) OVERRIDE; | 50 virtual void DrawGL(AwDrawGLInfo* draw_info) OVERRIDE; |
| 51 virtual void SetScrollForHWFrame(int x, int y) OVERRIDE; | 51 virtual void SetScrollForHWFrame(int x, int y) OVERRIDE; |
| 52 virtual bool DrawSW(jobject java_canvas, const gfx::Rect& clip) OVERRIDE; | 52 virtual bool DrawSW(jobject java_canvas, const gfx::Rect& clip) OVERRIDE; |
| 53 virtual base::android::ScopedJavaLocalRef<jobject> CapturePicture() OVERRIDE; | 53 virtual base::android::ScopedJavaLocalRef<jobject> CapturePicture() OVERRIDE; |
| 54 virtual void EnableOnNewPicture(OnNewPictureMode mode) OVERRIDE; | 54 virtual void EnableOnNewPicture(OnNewPictureMode mode) OVERRIDE; |
| 55 virtual void OnVisibilityChanged( | 55 virtual void OnVisibilityChanged( |
| 56 bool view_visible, bool window_visible) OVERRIDE; | 56 bool view_visible, bool window_visible) OVERRIDE; |
| 57 virtual void OnSizeChanged(int width, int height) OVERRIDE; | 57 virtual void OnSizeChanged(int width, int height) OVERRIDE; |
| 58 virtual void OnAttachedToWindow(int width, int height) OVERRIDE; | 58 virtual void OnAttachedToWindow(int width, int height) OVERRIDE; |
| 59 virtual void OnDetachedFromWindow() OVERRIDE; | 59 virtual void OnDetachedFromWindow() OVERRIDE; |
| 60 virtual bool IsAttachedToWindow() OVERRIDE; |
| 61 virtual bool IsViewVisible() OVERRIDE; |
| 62 virtual gfx::Rect GetScreenRect() OVERRIDE; |
| 60 | 63 |
| 61 // content::Compositor::Client implementation. | 64 // content::Compositor::Client implementation. |
| 62 virtual void ScheduleComposite() OVERRIDE; | 65 virtual void ScheduleComposite() OVERRIDE; |
| 63 | 66 |
| 64 // ViewRendererHost::Client implementation. | 67 // ViewRendererHost::Client implementation. |
| 65 virtual void OnPictureUpdated(int process_id, int render_view_id) OVERRIDE; | 68 virtual void OnPictureUpdated(int process_id, int render_view_id) OVERRIDE; |
| 66 | 69 |
| 67 protected: | 70 protected: |
| 68 BrowserViewRendererImpl(BrowserViewRenderer::Client* client, | 71 BrowserViewRendererImpl(BrowserViewRenderer::Client* client, |
| 69 JavaHelper* java_helper); | 72 JavaHelper* java_helper); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 97 // Applies the transformation matrix. | 100 // Applies the transformation matrix. |
| 98 scoped_refptr<cc::Layer> transform_layer_; | 101 scoped_refptr<cc::Layer> transform_layer_; |
| 99 | 102 |
| 100 // Ensures content is drawn within the scissor clip rect provided by the | 103 // Ensures content is drawn within the scissor clip rect provided by the |
| 101 // Android framework. | 104 // Android framework. |
| 102 scoped_refptr<cc::Layer> scissor_clip_layer_; | 105 scoped_refptr<cc::Layer> scissor_clip_layer_; |
| 103 | 106 |
| 104 // Last View scroll before hardware rendering is triggered. | 107 // Last View scroll before hardware rendering is triggered. |
| 105 gfx::Point hw_rendering_scroll_; | 108 gfx::Point hw_rendering_scroll_; |
| 106 | 109 |
| 110 bool view_attached_; |
| 107 bool view_visible_; | 111 bool view_visible_; |
| 108 bool compositor_visible_; | 112 bool compositor_visible_; |
| 109 bool is_composite_pending_; | 113 bool is_composite_pending_; |
| 110 float dpi_scale_; | 114 float dpi_scale_; |
| 111 float page_scale_; | 115 float page_scale_; |
| 112 gfx::Size view_size_; | 116 gfx::Size view_size_; |
| 113 gfx::SizeF content_size_css_; | 117 gfx::SizeF content_size_css_; |
| 114 OnNewPictureMode on_new_picture_mode_; | 118 OnNewPictureMode on_new_picture_mode_; |
| 115 | 119 |
| 116 // Used only for detecting Android View System context changes. | 120 // Used only for detecting Android View System context changes. |
| 117 // Not to be used between draw calls. | 121 // Not to be used between draw calls. |
| 118 EGLContext last_frame_context_; | 122 EGLContext last_frame_context_; |
| 119 | 123 |
| 120 // Set via SetContents. Used to recognize updates to the local WebView. | 124 // Set via SetContents. Used to recognize updates to the local WebView. |
| 121 content::WebContents* web_contents_; | 125 content::WebContents* web_contents_; |
| 122 | 126 |
| 123 // Used to observe frame metadata updates. | 127 // Used to observe frame metadata updates. |
| 124 content::ContentViewCore::UpdateFrameInfoCallback update_frame_info_callback_; | 128 content::ContentViewCore::UpdateFrameInfoCallback update_frame_info_callback_; |
| 125 | 129 |
| 126 DISALLOW_COPY_AND_ASSIGN(BrowserViewRendererImpl); | 130 DISALLOW_COPY_AND_ASSIGN(BrowserViewRendererImpl); |
| 127 }; | 131 }; |
| 128 | 132 |
| 129 } // namespace android_webview | 133 } // namespace android_webview |
| 130 | 134 |
| 131 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_IMPL_H_ | 135 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_IMPL_H_ |
| OLD | NEW |