| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 virtual void InstrumentWillBeginFrame() {} | 216 virtual void InstrumentWillBeginFrame() {} |
| 217 virtual void InstrumentDidBeginFrame() {} | 217 virtual void InstrumentDidBeginFrame() {} |
| 218 virtual void InstrumentDidCancelFrame() {} | 218 virtual void InstrumentDidCancelFrame() {} |
| 219 virtual void InstrumentWillComposite() {} | 219 virtual void InstrumentWillComposite() {} |
| 220 | 220 |
| 221 virtual bool AllowPartialSwap() const; | 221 virtual bool AllowPartialSwap() const; |
| 222 bool UsingSynchronousRendererCompositor() const; | 222 bool UsingSynchronousRendererCompositor() const; |
| 223 | 223 |
| 224 bool is_swapped_out() { return is_swapped_out_; } | 224 bool is_swapped_out() { return is_swapped_out_; } |
| 225 | 225 |
| 226 void ScheduleCompositeWithForcedRedraw(); |
| 227 |
| 226 protected: | 228 protected: |
| 227 // Friend RefCounted so that the dtor can be non-public. Using this class | 229 // Friend RefCounted so that the dtor can be non-public. Using this class |
| 228 // without ref-counting is an error. | 230 // without ref-counting is an error. |
| 229 friend class base::RefCounted<RenderWidget>; | 231 friend class base::RefCounted<RenderWidget>; |
| 230 // For unit tests. | 232 // For unit tests. |
| 231 friend class RenderWidgetTest; | 233 friend class RenderWidgetTest; |
| 232 | 234 |
| 233 enum ResizeAck { | 235 enum ResizeAck { |
| 234 SEND_RESIZE_ACK, | 236 SEND_RESIZE_ACK, |
| 235 NO_RESIZE_ACK, | 237 NO_RESIZE_ACK, |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 | 521 |
| 520 // Check whether the WebWidget has any touch event handlers registered. | 522 // Check whether the WebWidget has any touch event handlers registered. |
| 521 virtual void hasTouchEventHandlers(bool has_handlers); | 523 virtual void hasTouchEventHandlers(bool has_handlers); |
| 522 | 524 |
| 523 // Creates a 3D context associated with this view. | 525 // Creates a 3D context associated with this view. |
| 524 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D( | 526 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D( |
| 525 const WebKit::WebGraphicsContext3D::Attributes& attributes); | 527 const WebKit::WebGraphicsContext3D::Attributes& attributes); |
| 526 | 528 |
| 527 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap); | 529 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap); |
| 528 | 530 |
| 531 void ScheduleCompositeImpl(bool force_redraw); |
| 532 |
| 529 // Routing ID that allows us to communicate to the parent browser process | 533 // Routing ID that allows us to communicate to the parent browser process |
| 530 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. | 534 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. |
| 531 int32 routing_id_; | 535 int32 routing_id_; |
| 532 | 536 |
| 533 int32 surface_id_; | 537 int32 surface_id_; |
| 534 | 538 |
| 535 // We are responsible for destroying this object via its Close method. | 539 // We are responsible for destroying this object via its Close method. |
| 536 WebKit::WebWidget* webwidget_; | 540 WebKit::WebWidget* webwidget_; |
| 537 | 541 |
| 538 // This is lazily constructed and must not outlive webwidget_. | 542 // This is lazily constructed and must not outlive webwidget_. |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 #endif | 757 #endif |
| 754 | 758 |
| 755 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; | 759 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; |
| 756 | 760 |
| 757 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 761 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 758 }; | 762 }; |
| 759 | 763 |
| 760 } // namespace content | 764 } // namespace content |
| 761 | 765 |
| 762 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 766 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |