OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <queue> | 9 #include <queue> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... | |
33 } | 33 } |
34 | 34 |
35 namespace WebKit { | 35 namespace WebKit { |
36 class WebExternalTextureLayer; | 36 class WebExternalTextureLayer; |
37 class WebTouchEvent; | 37 class WebTouchEvent; |
38 class WebMouseEvent; | 38 class WebMouseEvent; |
39 } | 39 } |
40 | 40 |
41 namespace content { | 41 namespace content { |
42 class ContentViewCoreImpl; | 42 class ContentViewCoreImpl; |
43 class OverscrollGlow; | |
43 class RenderWidgetHost; | 44 class RenderWidgetHost; |
44 class RenderWidgetHostImpl; | 45 class RenderWidgetHostImpl; |
45 class SurfaceTextureTransportClient; | 46 class SurfaceTextureTransportClient; |
46 struct NativeWebKeyboardEvent; | 47 struct NativeWebKeyboardEvent; |
47 | 48 |
48 // ----------------------------------------------------------------------------- | 49 // ----------------------------------------------------------------------------- |
49 // See comments in render_widget_host_view.h about this class and its members. | 50 // See comments in render_widget_host_view.h about this class and its members. |
50 // ----------------------------------------------------------------------------- | 51 // ----------------------------------------------------------------------------- |
51 class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase, | 52 class RenderWidgetHostViewAndroid : public RenderWidgetHostViewBase, |
52 public cc::TextureLayerClient { | 53 public cc::TextureLayerClient { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
140 virtual InputEventAckState FilterInputEvent( | 141 virtual InputEventAckState FilterInputEvent( |
141 const WebKit::WebInputEvent& input_event) OVERRIDE; | 142 const WebKit::WebInputEvent& input_event) OVERRIDE; |
142 virtual void OnAccessibilityNotifications( | 143 virtual void OnAccessibilityNotifications( |
143 const std::vector<AccessibilityHostMsg_NotificationParams>& | 144 const std::vector<AccessibilityHostMsg_NotificationParams>& |
144 params) OVERRIDE; | 145 params) OVERRIDE; |
145 virtual bool LockMouse() OVERRIDE; | 146 virtual bool LockMouse() OVERRIDE; |
146 virtual void UnlockMouse() OVERRIDE; | 147 virtual void UnlockMouse() OVERRIDE; |
147 virtual void HasTouchEventHandlers(bool need_touch_events) OVERRIDE; | 148 virtual void HasTouchEventHandlers(bool need_touch_events) OVERRIDE; |
148 virtual void OnSwapCompositorFrame( | 149 virtual void OnSwapCompositorFrame( |
149 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; | 150 scoped_ptr<cc::CompositorFrame> frame) OVERRIDE; |
151 virtual void OnOverscrolled(const gfx::Vector2dF& accumulated_overscroll, | |
aelias_OOO_until_Jul13
2013/04/22 23:46:48
Just gfx::Vector2dF
jdduke (slow)
2013/04/23 16:02:13
Done.
| |
152 const gfx::Vector2dF& current_fling_velocity) | |
153 OVERRIDE; | |
150 virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect, | 154 virtual void ShowDisambiguationPopup(const gfx::Rect& target_rect, |
151 const SkBitmap& zoomed_bitmap) OVERRIDE; | 155 const SkBitmap& zoomed_bitmap) OVERRIDE; |
152 | 156 |
153 // cc::TextureLayerClient implementation. | 157 // cc::TextureLayerClient implementation. |
154 virtual unsigned PrepareTexture(cc::ResourceUpdateQueue* queue) OVERRIDE; | 158 virtual unsigned PrepareTexture(cc::ResourceUpdateQueue* queue) OVERRIDE; |
155 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE; | 159 virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE; |
156 virtual bool PrepareTextureMailbox(cc::TextureMailbox* mailbox) OVERRIDE; | 160 virtual bool PrepareTextureMailbox(cc::TextureMailbox* mailbox) OVERRIDE; |
157 | 161 |
158 // Non-virtual methods | 162 // Non-virtual methods |
159 void SetContentViewCore(ContentViewCoreImpl* content_view_core); | 163 void SetContentViewCore(ContentViewCoreImpl* content_view_core); |
(...skipping 25 matching lines...) Expand all Loading... | |
185 void MoveCaret(const gfx::Point& point); | 189 void MoveCaret(const gfx::Point& point); |
186 | 190 |
187 private: | 191 private: |
188 void BuffersSwapped(const gpu::Mailbox& mailbox, | 192 void BuffersSwapped(const gpu::Mailbox& mailbox, |
189 const gfx::Size texture_size, | 193 const gfx::Size texture_size, |
190 const gfx::SizeF content_size, | 194 const gfx::SizeF content_size, |
191 const base::Closure& ack_callback); | 195 const base::Closure& ack_callback); |
192 | 196 |
193 void RunAckCallbacks(); | 197 void RunAckCallbacks(); |
194 | 198 |
199 void RequestVSyncNotificationsIfNecessary(); | |
200 | |
201 void AttachLayers(); | |
202 void RemoveLayers(); | |
203 | |
204 void Animate(); | |
205 void ScheduleAnimation(); | |
206 | |
195 // The model object. | 207 // The model object. |
196 RenderWidgetHostImpl* host_; | 208 RenderWidgetHostImpl* host_; |
197 | 209 |
198 // Whether or not this widget is potentially attached to the view hierarchy. | 210 // Whether or not this widget is potentially attached to the view hierarchy. |
199 // This view may not actually be attached if this is true, but it should be | 211 // This view may not actually be attached if this is true, but it should be |
200 // treated as such, because as soon as a ContentViewCore is set the layer | 212 // treated as such, because as soon as a ContentViewCore is set the layer |
201 // will be attached automatically. | 213 // will be attached automatically. |
202 bool is_layer_attached_; | 214 bool are_layers_attached_; |
203 | 215 |
204 // ContentViewCoreImpl is our interface to the view system. | 216 // ContentViewCoreImpl is our interface to the view system. |
205 ContentViewCoreImpl* content_view_core_; | 217 ContentViewCoreImpl* content_view_core_; |
206 | 218 |
207 ImeAdapterAndroid ime_adapter_android_; | 219 ImeAdapterAndroid ime_adapter_android_; |
208 | 220 |
209 // Body background color of the underlying document. | 221 // Body background color of the underlying document. |
210 SkColor cached_background_color_; | 222 SkColor cached_background_color_; |
211 | 223 |
212 // The texture layer for this view when using browser-side compositing. | 224 // The texture layer for this view when using browser-side compositing. |
(...skipping 16 matching lines...) Expand all Loading... | |
229 // The mailbox of the previously received frame. | 241 // The mailbox of the previously received frame. |
230 gpu::Mailbox current_mailbox_; | 242 gpu::Mailbox current_mailbox_; |
231 | 243 |
232 // The mailbox of the frame we last returned. | 244 // The mailbox of the frame we last returned. |
233 gpu::Mailbox last_mailbox_; | 245 gpu::Mailbox last_mailbox_; |
234 | 246 |
235 bool consumed_current_texture_; | 247 bool consumed_current_texture_; |
236 | 248 |
237 std::queue<base::Closure> ack_callbacks_; | 249 std::queue<base::Closure> ack_callbacks_; |
238 | 250 |
251 bool vsync_notifications_enabled_; | |
aelias_OOO_until_Jul13
2013/04/22 23:46:48
Please delete this field (see comment in .cc file)
jdduke (slow)
2013/04/23 16:02:13
See reply in .cc file.
| |
252 bool client_vsync_notifications_enabled_; | |
aelias_OOO_until_Jul13
2013/04/22 23:46:48
Please rename to "renderer_vsync_notifications_ena
jdduke (slow)
2013/04/23 16:02:13
Done.
| |
253 bool animation_vsync_notifications_enabled_; | |
254 | |
255 // Used to render overscroll overlays | |
256 scoped_ptr<OverscrollGlow> overscroll_effect_; | |
257 | |
239 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 258 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
240 }; | 259 }; |
241 | 260 |
242 } // namespace content | 261 } // namespace content |
243 | 262 |
244 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 263 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
OLD | NEW |