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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 // Fills in a GpuRenderingStats struct containing information about | 167 // Fills in a GpuRenderingStats struct containing information about |
168 // GPU rendering, e.g. count of texture uploads performed, time spent | 168 // GPU rendering, e.g. count of texture uploads performed, time spent |
169 // uploading. | 169 // uploading. |
170 // This call is relatively expensive as it blocks on the GPU process | 170 // This call is relatively expensive as it blocks on the GPU process |
171 bool GetGpuRenderingStats(GpuRenderingStats*) const; | 171 bool GetGpuRenderingStats(GpuRenderingStats*) const; |
172 | 172 |
173 void GetBrowserRenderingStats(BrowserRenderingStats* stats); | 173 void GetBrowserRenderingStats(BrowserRenderingStats* stats); |
174 | 174 |
175 RenderWidgetCompositor* compositor() const; | 175 RenderWidgetCompositor* compositor() const; |
176 | 176 |
177 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback); | 177 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( |
| 178 bool fallback, size_t max_bytes_pending_upload); |
178 | 179 |
179 // Callback for use with BeginSmoothScroll. | 180 // Callback for use with BeginSmoothScroll. |
180 typedef base::Callback<void()> SmoothScrollCompletionCallback; | 181 typedef base::Callback<void()> SmoothScrollCompletionCallback; |
181 | 182 |
182 // Directs the host to begin a smooth scroll. This scroll should have the same | 183 // Directs the host to begin a smooth scroll. This scroll should have the same |
183 // performance characteristics as a user-initiated scroll. Returns an ID of | 184 // performance characteristics as a user-initiated scroll. Returns an ID of |
184 // the scroll gesture. |mouse_event_x| and |mouse_event_y| are expected to be | 185 // the scroll gesture. |mouse_event_x| and |mouse_event_y| are expected to be |
185 // in local DIP coordinates. | 186 // in local DIP coordinates. |
186 void BeginSmoothScroll(bool scroll_down, | 187 void BeginSmoothScroll(bool scroll_down, |
187 const SmoothScrollCompletionCallback& callback, | 188 const SmoothScrollCompletionCallback& callback, |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 | 507 |
507 // Check whether the WebWidget has any touch event handlers registered | 508 // Check whether the WebWidget has any touch event handlers registered |
508 // at the given point. | 509 // at the given point. |
509 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const; | 510 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const; |
510 | 511 |
511 // Check whether the WebWidget has any touch event handlers registered. | 512 // Check whether the WebWidget has any touch event handlers registered. |
512 virtual void hasTouchEventHandlers(bool has_handlers); | 513 virtual void hasTouchEventHandlers(bool has_handlers); |
513 | 514 |
514 // Creates a 3D context associated with this view. | 515 // Creates a 3D context associated with this view. |
515 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D( | 516 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D( |
516 const WebKit::WebGraphicsContext3D::Attributes& attributes); | 517 const WebKit::WebGraphicsContext3D::Attributes& attributes, |
| 518 size_t max_bytes_pending_upload); |
517 | 519 |
518 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap); | 520 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap); |
519 | 521 |
520 // Routing ID that allows us to communicate to the parent browser process | 522 // Routing ID that allows us to communicate to the parent browser process |
521 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. | 523 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. |
522 int32 routing_id_; | 524 int32 routing_id_; |
523 | 525 |
524 int32 surface_id_; | 526 int32 surface_id_; |
525 | 527 |
526 // We are responsible for destroying this object via its Close method. | 528 // We are responsible for destroying this object via its Close method. |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 #endif | 739 #endif |
738 | 740 |
739 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; | 741 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; |
740 | 742 |
741 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 743 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
742 }; | 744 }; |
743 | 745 |
744 } // namespace content | 746 } // namespace content |
745 | 747 |
746 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 748 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |