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_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 5 #ifndef CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
6 #define CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 6 #define CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 struct WebPluginGeometry; | 40 struct WebPluginGeometry; |
41 } | 41 } |
42 } | 42 } |
43 | 43 |
44 namespace WebKit { | 44 namespace WebKit { |
45 struct WebScreenInfo; | 45 struct WebScreenInfo; |
46 } | 46 } |
47 | 47 |
48 namespace content { | 48 namespace content { |
49 class BackingStore; | 49 class BackingStore; |
| 50 class RenderWidgetHostViewFrameSubscriber; |
50 class SmoothScrollGesture; | 51 class SmoothScrollGesture; |
51 struct NativeWebKeyboardEvent; | 52 struct NativeWebKeyboardEvent; |
52 | 53 |
53 // This is the larger RenderWidgetHostView interface exposed only | 54 // This is the larger RenderWidgetHostView interface exposed only |
54 // within content/ and to embedders looking to port to new platforms. | 55 // within content/ and to embedders looking to port to new platforms. |
55 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. | 56 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. |
56 class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView, | 57 class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView, |
57 public IPC::Listener { | 58 public IPC::Listener { |
58 public: | 59 public: |
59 virtual ~RenderWidgetHostViewPort() {} | 60 virtual ~RenderWidgetHostViewPort() {} |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 const base::Callback<void(bool)>& callback) = 0; | 192 const base::Callback<void(bool)>& callback) = 0; |
192 | 193 |
193 // Returns true if CopyFromCompositingSurfaceToVideoFrame() is likely to | 194 // Returns true if CopyFromCompositingSurfaceToVideoFrame() is likely to |
194 // succeed. | 195 // succeed. |
195 // | 196 // |
196 // TODO(nick): When VideoFrame copies are broadly implemented, this method | 197 // TODO(nick): When VideoFrame copies are broadly implemented, this method |
197 // should be renamed to HasCompositingSurface(), or unified with | 198 // should be renamed to HasCompositingSurface(), or unified with |
198 // IsSurfaceAvailableForCopy() and HasAcceleratedSurface(). | 199 // IsSurfaceAvailableForCopy() and HasAcceleratedSurface(). |
199 virtual bool CanCopyToVideoFrame() const = 0; | 200 virtual bool CanCopyToVideoFrame() const = 0; |
200 | 201 |
| 202 // Return true if frame subscription is supported on this platform. |
| 203 virtual bool CanSubscribeFrame() const = 0; |
| 204 |
| 205 // Begin subscribing for presentation events and captured frames. |
| 206 // |subscriber| is now owned by this object, it will be called only on the |
| 207 // UI thread. |
| 208 virtual void BeginFrameSubscription( |
| 209 RenderWidgetHostViewFrameSubscriber* subscriber) = 0; |
| 210 |
| 211 // End subscribing for frame presentation events. FrameSubscriber will be |
| 212 // deleted after this call. |
| 213 virtual void EndFrameSubscription() = 0; |
| 214 |
201 // Called when accelerated compositing state changes. | 215 // Called when accelerated compositing state changes. |
202 virtual void OnAcceleratedCompositingStateChange() = 0; | 216 virtual void OnAcceleratedCompositingStateChange() = 0; |
203 // |params.window| and |params.surface_id| indicate which accelerated | 217 // |params.window| and |params.surface_id| indicate which accelerated |
204 // surface's buffers swapped. |params.renderer_id| and |params.route_id| | 218 // surface's buffers swapped. |params.renderer_id| and |params.route_id| |
205 // are used to formulate a reply to the GPU process to prevent it from getting | 219 // are used to formulate a reply to the GPU process to prevent it from getting |
206 // too far ahead. They may all be zero, in which case no flow control is | 220 // too far ahead. They may all be zero, in which case no flow control is |
207 // enforced; this case is currently used for accelerated plugins. | 221 // enforced; this case is currently used for accelerated plugins. |
208 virtual void AcceleratedSurfaceBuffersSwapped( | 222 virtual void AcceleratedSurfaceBuffersSwapped( |
209 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel, | 223 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel, |
210 int gpu_host_id) = 0; | 224 int gpu_host_id) = 0; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 #endif | 306 #endif |
293 | 307 |
294 #if defined(OS_WIN) && !defined(USE_AURA) | 308 #if defined(OS_WIN) && !defined(USE_AURA) |
295 virtual void WillWmDestroy() = 0; | 309 virtual void WillWmDestroy() = 0; |
296 #endif | 310 #endif |
297 }; | 311 }; |
298 | 312 |
299 } // namespace content | 313 } // namespace content |
300 | 314 |
301 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 315 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
OLD | NEW |