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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 class WebExternalTextureLayer; | 50 class WebExternalTextureLayer; |
51 class WebTouchEvent; | 51 class WebTouchEvent; |
52 class WebMouseEvent; | 52 class WebMouseEvent; |
53 } | 53 } |
54 | 54 |
55 namespace content { | 55 namespace content { |
56 class ContentViewCoreImpl; | 56 class ContentViewCoreImpl; |
57 class OverscrollControllerAndroid; | 57 class OverscrollControllerAndroid; |
58 class RenderWidgetHost; | 58 class RenderWidgetHost; |
59 class RenderWidgetHostImpl; | 59 class RenderWidgetHostImpl; |
| 60 class SynchronousCompositorImpl; |
60 struct DidOverscrollParams; | 61 struct DidOverscrollParams; |
61 struct NativeWebKeyboardEvent; | 62 struct NativeWebKeyboardEvent; |
62 | 63 |
63 // ----------------------------------------------------------------------------- | 64 // ----------------------------------------------------------------------------- |
64 // See comments in render_widget_host_view.h about this class and its members. | 65 // See comments in render_widget_host_view.h about this class and its members. |
65 // ----------------------------------------------------------------------------- | 66 // ----------------------------------------------------------------------------- |
66 class CONTENT_EXPORT RenderWidgetHostViewAndroid | 67 class CONTENT_EXPORT RenderWidgetHostViewAndroid |
67 : public RenderWidgetHostViewBase, | 68 : public RenderWidgetHostViewBase, |
68 public cc::DelegatedFrameResourceCollectionClient, | 69 public cc::DelegatedFrameResourceCollectionClient, |
69 public cc::SurfaceFactoryClient, | 70 public cc::SurfaceFactoryClient, |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 scoped_refptr<cc::Layer> CreateDelegatedLayer() const; | 235 scoped_refptr<cc::Layer> CreateDelegatedLayer() const; |
235 | 236 |
236 bool HasValidFrame() const; | 237 bool HasValidFrame() const; |
237 | 238 |
238 void MoveCaret(const gfx::Point& point); | 239 void MoveCaret(const gfx::Point& point); |
239 void DismissTextHandles(); | 240 void DismissTextHandles(); |
240 void SetTextHandlesTemporarilyHidden(bool hidden); | 241 void SetTextHandlesTemporarilyHidden(bool hidden); |
241 void OnShowingPastePopup(const gfx::PointF& point); | 242 void OnShowingPastePopup(const gfx::PointF& point); |
242 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); | 243 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); |
243 | 244 |
| 245 SynchronousCompositorImpl* GetSynchronousCompositorImpl(); |
244 void SynchronousFrameMetadata( | 246 void SynchronousFrameMetadata( |
245 const cc::CompositorFrameMetadata& frame_metadata); | 247 const cc::CompositorFrameMetadata& frame_metadata); |
246 | 248 |
247 void SetOverlayVideoMode(bool enabled); | 249 void SetOverlayVideoMode(bool enabled); |
248 | 250 |
249 typedef base::Callback< | 251 typedef base::Callback< |
250 void(const base::string16& content, int start_offset, int end_offset)> | 252 void(const base::string16& content, int start_offset, int end_offset)> |
251 TextSurroundingSelectionCallback; | 253 TextSurroundingSelectionCallback; |
252 void SetTextSurroundingSelectionCallback( | 254 void SetTextSurroundingSelectionCallback( |
253 const TextSurroundingSelectionCallback& callback); | 255 const TextSurroundingSelectionCallback& callback); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 StylusTextSelector stylus_text_selector_; | 382 StylusTextSelector stylus_text_selector_; |
381 | 383 |
382 // Manages selection handle rendering and manipulation. | 384 // Manages selection handle rendering and manipulation. |
383 // This will always be NULL if |content_view_core_| is NULL. | 385 // This will always be NULL if |content_view_core_| is NULL. |
384 scoped_ptr<ui::TouchSelectionController> selection_controller_; | 386 scoped_ptr<ui::TouchSelectionController> selection_controller_; |
385 | 387 |
386 // Size to use if we have no backing ContentViewCore | 388 // Size to use if we have no backing ContentViewCore |
387 gfx::Size default_size_; | 389 gfx::Size default_size_; |
388 | 390 |
389 const bool using_browser_compositor_; | 391 const bool using_browser_compositor_; |
| 392 scoped_ptr<SynchronousCompositorImpl> sync_compositor_; |
390 | 393 |
391 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; | 394 scoped_ptr<DelegatedFrameEvictor> frame_evictor_; |
392 | 395 |
393 size_t locks_on_frame_count_; | 396 size_t locks_on_frame_count_; |
394 bool observing_root_window_; | 397 bool observing_root_window_; |
395 | 398 |
396 struct LastFrameInfo { | 399 struct LastFrameInfo { |
397 LastFrameInfo(uint32 output_id, | 400 LastFrameInfo(uint32 output_id, |
398 scoped_ptr<cc::CompositorFrame> output_frame); | 401 scoped_ptr<cc::CompositorFrame> output_frame); |
399 ~LastFrameInfo(); | 402 ~LastFrameInfo(); |
400 uint32 output_surface_id; | 403 uint32 output_surface_id; |
401 scoped_ptr<cc::CompositorFrame> frame; | 404 scoped_ptr<cc::CompositorFrame> frame; |
402 }; | 405 }; |
403 | 406 |
404 scoped_ptr<LastFrameInfo> last_frame_info_; | 407 scoped_ptr<LastFrameInfo> last_frame_info_; |
405 | 408 |
406 TextSurroundingSelectionCallback text_surrounding_selection_callback_; | 409 TextSurroundingSelectionCallback text_surrounding_selection_callback_; |
407 | 410 |
408 // The last scroll offset of the view. | 411 // The last scroll offset of the view. |
409 gfx::Vector2dF last_scroll_offset_; | 412 gfx::Vector2dF last_scroll_offset_; |
410 | 413 |
411 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; | 414 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; |
412 | 415 |
413 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); | 416 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); |
414 }; | 417 }; |
415 | 418 |
416 } // namespace content | 419 } // namespace content |
417 | 420 |
418 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ | 421 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ |
OLD | NEW |