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 CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ |
6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ | 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // SynchronousCompositorOutputSurfaceDelegate | 70 // SynchronousCompositorOutputSurfaceDelegate |
71 virtual void DidBindOutputSurface( | 71 virtual void DidBindOutputSurface( |
72 SynchronousCompositorOutputSurface* output_surface) OVERRIDE; | 72 SynchronousCompositorOutputSurface* output_surface) OVERRIDE; |
73 virtual void DidDestroySynchronousOutputSurface( | 73 virtual void DidDestroySynchronousOutputSurface( |
74 SynchronousCompositorOutputSurface* output_surface) OVERRIDE; | 74 SynchronousCompositorOutputSurface* output_surface) OVERRIDE; |
75 virtual void SetContinuousInvalidate(bool enable) OVERRIDE; | 75 virtual void SetContinuousInvalidate(bool enable) OVERRIDE; |
76 virtual void DidActivatePendingTree() OVERRIDE; | 76 virtual void DidActivatePendingTree() OVERRIDE; |
77 | 77 |
78 // LayerScrollOffsetDelegate | 78 // LayerScrollOffsetDelegate |
79 virtual gfx::Vector2dF GetTotalScrollOffset() OVERRIDE; | 79 virtual gfx::ScrollOffset GetTotalScrollOffset() OVERRIDE; |
80 virtual void UpdateRootLayerState(const gfx::Vector2dF& total_scroll_offset, | 80 virtual void UpdateRootLayerState( |
81 const gfx::Vector2dF& max_scroll_offset, | 81 const gfx::ScrollOffset& total_scroll_offset, |
82 const gfx::SizeF& scrollable_size, | 82 const gfx::ScrollOffset& max_scroll_offset, |
83 float page_scale_factor, | 83 const gfx::SizeF& scrollable_size, |
84 float min_page_scale_factor, | 84 float page_scale_factor, |
85 float max_page_scale_factor) OVERRIDE; | 85 float min_page_scale_factor, |
| 86 float max_page_scale_factor) OVERRIDE; |
86 virtual bool IsExternalFlingActive() const OVERRIDE; | 87 virtual bool IsExternalFlingActive() const OVERRIDE; |
87 | 88 |
88 void SetInputHandler(cc::InputHandler* input_handler); | 89 void SetInputHandler(cc::InputHandler* input_handler); |
89 void DidOverscroll(const DidOverscrollParams& params); | 90 void DidOverscroll(const DidOverscrollParams& params); |
90 void DidStopFlinging(); | 91 void DidStopFlinging(); |
91 | 92 |
92 private: | 93 private: |
93 explicit SynchronousCompositorImpl(WebContents* contents); | 94 explicit SynchronousCompositorImpl(WebContents* contents); |
94 virtual ~SynchronousCompositorImpl(); | 95 virtual ~SynchronousCompositorImpl(); |
95 friend class WebContentsUserData<SynchronousCompositorImpl>; | 96 friend class WebContentsUserData<SynchronousCompositorImpl>; |
96 | 97 |
97 void UpdateFrameMetaData(const cc::CompositorFrameMetadata& frame_info); | 98 void UpdateFrameMetaData(const cc::CompositorFrameMetadata& frame_info); |
98 void DeliverMessages(); | 99 void DeliverMessages(); |
99 bool CalledOnValidThread() const; | 100 bool CalledOnValidThread() const; |
100 | 101 |
101 SynchronousCompositorClient* compositor_client_; | 102 SynchronousCompositorClient* compositor_client_; |
102 SynchronousCompositorOutputSurface* output_surface_; | 103 SynchronousCompositorOutputSurface* output_surface_; |
103 WebContents* contents_; | 104 WebContents* contents_; |
104 cc::InputHandler* input_handler_; | 105 cc::InputHandler* input_handler_; |
105 | 106 |
106 base::WeakPtrFactory<SynchronousCompositorImpl> weak_ptr_factory_; | 107 base::WeakPtrFactory<SynchronousCompositorImpl> weak_ptr_factory_; |
107 | 108 |
108 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl); | 109 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl); |
109 }; | 110 }; |
110 | 111 |
111 } // namespace content | 112 } // namespace content |
112 | 113 |
113 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ | 114 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_IMPL_H_ |
OLD | NEW |