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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 232 |
233 void DestroyDelegatedContent(); | 233 void DestroyDelegatedContent(); |
234 void SwapDelegatedFrame(uint32 output_surface_id, | 234 void SwapDelegatedFrame(uint32 output_surface_id, |
235 scoped_ptr<cc::DelegatedFrameData> frame_data); | 235 scoped_ptr<cc::DelegatedFrameData> frame_data); |
236 void SendDelegatedFrameAck(uint32 output_surface_id); | 236 void SendDelegatedFrameAck(uint32 output_surface_id); |
237 void SendReturnedDelegatedResources(uint32 output_surface_id); | 237 void SendReturnedDelegatedResources(uint32 output_surface_id); |
238 | 238 |
239 void OnFrameMetadataUpdated( | 239 void OnFrameMetadataUpdated( |
240 const cc::CompositorFrameMetadata& frame_metadata); | 240 const cc::CompositorFrameMetadata& frame_metadata); |
241 void ComputeContentsSize(const cc::CompositorFrameMetadata& frame_metadata); | 241 void ComputeContentsSize(const cc::CompositorFrameMetadata& frame_metadata); |
242 void ResetClipping(); | |
243 void ClipContents(const gfx::Rect& clipping, const gfx::Size& content_size); | |
244 | 242 |
245 void AttachLayers(); | 243 void AttachLayers(); |
246 void RemoveLayers(); | 244 void RemoveLayers(); |
247 | 245 |
248 // Called after async screenshot task completes. Scales and crops the result | 246 // Called after async screenshot task completes. Scales and crops the result |
249 // of the copy. | 247 // of the copy. |
250 static void PrepareTextureCopyOutputResult( | 248 static void PrepareTextureCopyOutputResult( |
251 const gfx::Size& dst_size_in_pixel, | 249 const gfx::Size& dst_size_in_pixel, |
252 const SkBitmap::Config config, | 250 const SkBitmap::Config config, |
253 const base::TimeTicks& start_time, | 251 const base::TimeTicks& start_time, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 // Android MotionEvent's) and touch event acks. | 327 // Android MotionEvent's) and touch event acks. |
330 ui::FilteredGestureProvider gesture_provider_; | 328 ui::FilteredGestureProvider gesture_provider_; |
331 | 329 |
332 bool flush_input_requested_; | 330 bool flush_input_requested_; |
333 | 331 |
334 int accelerated_surface_route_id_; | 332 int accelerated_surface_route_id_; |
335 | 333 |
336 // Size to use if we have no backing ContentViewCore | 334 // Size to use if we have no backing ContentViewCore |
337 gfx::Size default_size_; | 335 gfx::Size default_size_; |
338 | 336 |
| 337 // Cached rectangles for the selection anchor and focus. |
| 338 gfx::PointF cached_selection_anchor_; |
| 339 gfx::PointF cached_selection_focus_; |
| 340 bool cached_selection_anchor_visible_; |
| 341 bool cached_selection_focus_visible_; |
| 342 |
339 const bool using_synchronous_compositor_; | 343 const bool using_synchronous_compositor_; |
340 | 344 |
341 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; | 345 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; |
342 | 346 |
343 size_t locks_on_frame_count_; | 347 size_t locks_on_frame_count_; |
344 bool observing_root_window_; | 348 bool observing_root_window_; |
345 | 349 |
346 struct LastFrameInfo { | 350 struct LastFrameInfo { |
347 LastFrameInfo(uint32 output_id, | 351 LastFrameInfo(uint32 output_id, |
348 scoped_ptr<cc::CompositorFrame> output_frame); | 352 scoped_ptr<cc::CompositorFrame> output_frame); |
349 ~LastFrameInfo(); | 353 ~LastFrameInfo(); |
350 uint32 output_surface_id; | 354 uint32 output_surface_id; |
351 scoped_ptr<cc::CompositorFrame> frame; | 355 scoped_ptr<cc::CompositorFrame> frame; |
352 }; | 356 }; |
353 | 357 |
354 scoped_ptr<LastFrameInfo> last_frame_info_; | 358 scoped_ptr<LastFrameInfo> last_frame_info_; |
355 | 359 |
356 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 360 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
357 }; | 361 }; |
358 | 362 |
359 } // namespace content | 363 } // namespace content |
360 | 364 |
361 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 365 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
OLD | NEW |