| 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 | 522 |
| 521 // Check whether the WebWidget has any touch event handlers registered. | 523 // Check whether the WebWidget has any touch event handlers registered. |
| 522 virtual void hasTouchEventHandlers(bool has_handlers); | 524 virtual void hasTouchEventHandlers(bool has_handlers); |
| 523 | 525 |
| 524 // Creates a 3D context associated with this view. | 526 // Creates a 3D context associated with this view. |
| 525 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D( | 527 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D( |
| 526 const WebKit::WebGraphicsContext3D::Attributes& attributes); | 528 const WebKit::WebGraphicsContext3D::Attributes& attributes); |
| 527 | 529 |
| 528 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap); | 530 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap); |
| 529 | 531 |
| 532 void ScheduleCompositeImpl(bool force_redraw); |
| 533 |
| 530 // Routing ID that allows us to communicate to the parent browser process | 534 // Routing ID that allows us to communicate to the parent browser process |
| 531 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. | 535 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. |
| 532 int32 routing_id_; | 536 int32 routing_id_; |
| 533 | 537 |
| 534 int32 surface_id_; | 538 int32 surface_id_; |
| 535 | 539 |
| 536 // We are responsible for destroying this object via its Close method. | 540 // We are responsible for destroying this object via its Close method. |
| 537 WebKit::WebWidget* webwidget_; | 541 WebKit::WebWidget* webwidget_; |
| 538 | 542 |
| 539 // This is lazily constructed and must not outlive webwidget_. | 543 // This is lazily constructed and must not outlive webwidget_. |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 #endif | 753 #endif |
| 750 | 754 |
| 751 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; | 755 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; |
| 752 | 756 |
| 753 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 757 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 754 }; | 758 }; |
| 755 | 759 |
| 756 } // namespace content | 760 } // namespace content |
| 757 | 761 |
| 758 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 762 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |