Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: android_webview/browser/in_process_renderer/in_process_view_renderer.h

Issue 15002007: Delegate root layer scroll offset to android_webview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_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_impl.h" 8 #include "android_webview/browser/browser_view_renderer_impl.h"
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 virtual void OnAttachedToWindow(int width, int height) OVERRIDE; 48 virtual void OnAttachedToWindow(int width, int height) OVERRIDE;
49 virtual void OnDetachedFromWindow() OVERRIDE; 49 virtual void OnDetachedFromWindow() OVERRIDE;
50 virtual bool IsAttachedToWindow() OVERRIDE; 50 virtual bool IsAttachedToWindow() OVERRIDE;
51 virtual bool IsViewVisible() OVERRIDE; 51 virtual bool IsViewVisible() OVERRIDE;
52 virtual gfx::Rect GetScreenRect() OVERRIDE; 52 virtual gfx::Rect GetScreenRect() OVERRIDE;
53 53
54 // SynchronousCompositorClient overrides 54 // SynchronousCompositorClient overrides
55 virtual void DidDestroyCompositor( 55 virtual void DidDestroyCompositor(
56 content::SynchronousCompositor* compositor) OVERRIDE; 56 content::SynchronousCompositor* compositor) OVERRIDE;
57 virtual void SetContinuousInvalidate(bool invalidate) OVERRIDE; 57 virtual void SetContinuousInvalidate(bool invalidate) OVERRIDE;
58 virtual void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value) OVERRIDE;
59 virtual gfx::Vector2dF GetTotalRootLayerScrollOffset() OVERRIDE;
58 60
59 void WebContentsGone(); 61 void WebContentsGone();
60 62
61 private: 63 private:
62 void Invalidate(); 64 void Invalidate();
63 void EnsureContinuousInvalidation(); 65 void EnsureContinuousInvalidation();
64 bool DrawSWInternal(jobject java_canvas, 66 bool DrawSWInternal(jobject java_canvas,
65 const gfx::Rect& clip_bounds); 67 const gfx::Rect& clip_bounds);
66 bool RenderSW(SkCanvas* canvas); 68 bool RenderSW(SkCanvas* canvas);
67 bool CompositeSW(SkCanvas* canvas); 69 bool CompositeSW(SkCanvas* canvas);
(...skipping 17 matching lines...) Expand all
85 bool hardware_initialized_; 87 bool hardware_initialized_;
86 bool hardware_failed_; 88 bool hardware_failed_;
87 89
88 // Used only for detecting Android View System context changes. 90 // Used only for detecting Android View System context changes.
89 // Not to be used between draw calls. 91 // Not to be used between draw calls.
90 EGLContext egl_context_at_init_; 92 EGLContext egl_context_at_init_;
91 93
92 // Last View scroll before hardware rendering is triggered. 94 // Last View scroll before hardware rendering is triggered.
93 gfx::Point hw_rendering_scroll_; 95 gfx::Point hw_rendering_scroll_;
94 96
97 // TODO(mkosiba): Plumb through to Java
98 gfx::Vector2dF root_layer_scroll_offset_;
99
95 base::WeakPtrFactory<InProcessViewRenderer> weak_factory_; 100 base::WeakPtrFactory<InProcessViewRenderer> weak_factory_;
96 101
97 DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer); 102 DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer);
98 }; 103 };
99 104
100 } // namespace android_webview 105 } // namespace android_webview
101 106
102 #endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ 107 #endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698