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_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 | 46 |
47 namespace WebKit { | 47 namespace WebKit { |
48 class WebGestureEvent; | 48 class WebGestureEvent; |
49 class WebInputEvent; | 49 class WebInputEvent; |
50 class WebMouseEvent; | 50 class WebMouseEvent; |
51 class WebTouchEvent; | 51 class WebTouchEvent; |
52 struct WebPoint; | 52 struct WebPoint; |
53 struct WebRenderingStatsImpl; | 53 struct WebRenderingStatsImpl; |
54 } | 54 } |
55 | 55 |
56 namespace cc { class OutputSurface; } | 56 namespace cc { |
57 class InputHandlerClient; | |
jamesr
2013/05/29 23:00:50
this doesn't appear to be used, please revert
joth
2013/05/29 23:42:56
Done.
| |
58 class OutputSurface; | |
59 } | |
57 | 60 |
58 namespace ui { | 61 namespace ui { |
59 class Range; | 62 class Range; |
60 } | 63 } |
61 | 64 |
62 namespace webkit { | 65 namespace webkit { |
63 namespace npapi { | 66 namespace npapi { |
64 struct WebPluginGeometry; | 67 struct WebPluginGeometry; |
65 } // namespace npapi | 68 } // namespace npapi |
66 | 69 |
67 namespace ppapi { | 70 namespace ppapi { |
68 class PluginInstance; | 71 class PluginInstance; |
69 } // namespace ppapi | 72 } // namespace ppapi |
70 } // namespace webkit | 73 } // namespace webkit |
71 | 74 |
72 namespace content { | 75 namespace content { |
73 struct GpuRenderingStats; | 76 struct GpuRenderingStats; |
74 class RenderWidgetCompositor; | 77 class RenderWidgetCompositor; |
75 class RenderWidgetTest; | 78 class RenderWidgetTest; |
79 class SynchronousCompositorImpl; | |
76 | 80 |
77 // RenderWidget provides a communication bridge between a WebWidget and | 81 // RenderWidget provides a communication bridge between a WebWidget and |
78 // a RenderWidgetHost, the latter of which lives in a different process. | 82 // a RenderWidgetHost, the latter of which lives in a different process. |
79 class CONTENT_EXPORT RenderWidget | 83 class CONTENT_EXPORT RenderWidget |
80 : public IPC::Listener, | 84 : public IPC::Listener, |
81 public IPC::Sender, | 85 public IPC::Sender, |
82 NON_EXPORTED_BASE(virtual public WebKit::WebWidgetClient), | 86 NON_EXPORTED_BASE(virtual public WebKit::WebWidgetClient), |
83 NON_EXPORTED_BASE(public WebGraphicsContext3DSwapBuffersClient), | 87 NON_EXPORTED_BASE(public WebGraphicsContext3DSwapBuffersClient), |
84 public base::RefCounted<RenderWidget> { | 88 public base::RefCounted<RenderWidget> { |
85 public: | 89 public: |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
492 // at the given point. | 496 // at the given point. |
493 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const; | 497 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const; |
494 | 498 |
495 // Check whether the WebWidget has any touch event handlers registered. | 499 // Check whether the WebWidget has any touch event handlers registered. |
496 virtual void hasTouchEventHandlers(bool has_handlers); | 500 virtual void hasTouchEventHandlers(bool has_handlers); |
497 | 501 |
498 // Creates a 3D context associated with this view. | 502 // Creates a 3D context associated with this view. |
499 WebGraphicsContext3DCommandBufferImpl* CreateGraphicsContext3D( | 503 WebGraphicsContext3DCommandBufferImpl* CreateGraphicsContext3D( |
500 const WebKit::WebGraphicsContext3D::Attributes& attributes); | 504 const WebKit::WebGraphicsContext3D::Attributes& attributes); |
501 | 505 |
506 #if defined(OS_ANDROID) | |
507 // Lazily creates the synchronous compositor on first call. | |
508 SynchronousCompositorImpl* GetSynchronousCompositor(); | |
509 #endif | |
510 | |
502 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap); | 511 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap); |
503 | 512 |
504 // Routing ID that allows us to communicate to the parent browser process | 513 // Routing ID that allows us to communicate to the parent browser process |
505 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. | 514 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. |
506 int32 routing_id_; | 515 int32 routing_id_; |
507 | 516 |
508 int32 surface_id_; | 517 int32 surface_id_; |
509 | 518 |
510 // We are responsible for destroying this object via its Close method. | 519 // We are responsible for destroying this object via its Close method. |
511 WebKit::WebWidget* webwidget_; | 520 WebKit::WebWidget* webwidget_; |
512 | 521 |
513 // This is lazily constructed and must not outlive webwidget_. | 522 // This is lazily constructed and must not outlive webwidget_. |
514 scoped_ptr<RenderWidgetCompositor> compositor_; | 523 scoped_ptr<RenderWidgetCompositor> compositor_; |
515 | 524 |
525 #if defined(OS_ANDROID) | |
526 // This is lazily constructed. | |
527 scoped_ptr<SynchronousCompositorImpl> synchronous_compositor_; | |
528 #endif | |
529 | |
516 // Set to the ID of the view that initiated creating this view, if any. When | 530 // Set to the ID of the view that initiated creating this view, if any. When |
517 // the view was initiated by the browser (the common case), this will be | 531 // the view was initiated by the browser (the common case), this will be |
518 // MSG_ROUTING_NONE. This is used in determining ownership when opening | 532 // MSG_ROUTING_NONE. This is used in determining ownership when opening |
519 // child tabs. See RenderWidget::createWebViewWithRequest. | 533 // child tabs. See RenderWidget::createWebViewWithRequest. |
520 // | 534 // |
521 // This ID may refer to an invalid view if that view is closed before this | 535 // This ID may refer to an invalid view if that view is closed before this |
522 // view is. | 536 // view is. |
523 int32 opener_id_; | 537 int32 opener_id_; |
524 | 538 |
525 // The position where this view should be initially shown. | 539 // The position where this view should be initially shown. |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
713 bool overscroll_notifications_enabled_; | 727 bool overscroll_notifications_enabled_; |
714 | 728 |
715 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; | 729 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; |
716 | 730 |
717 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 731 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
718 }; | 732 }; |
719 | 733 |
720 } // namespace content | 734 } // namespace content |
721 | 735 |
722 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 736 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |