Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 35 struct WebPluginGeometry; | 35 struct WebPluginGeometry; |
| 36 } | 36 } |
| 37 } | 37 } |
| 38 | 38 |
| 39 namespace WebKit { | 39 namespace WebKit { |
| 40 struct WebScreenInfo; | 40 struct WebScreenInfo; |
| 41 } | 41 } |
| 42 | 42 |
| 43 namespace content { | 43 namespace content { |
| 44 class BackingStore; | 44 class BackingStore; |
| 45 class RenderWidgetHostViewFrameSubscriber; | |
| 45 class SmoothScrollGesture; | 46 class SmoothScrollGesture; |
| 46 struct NativeWebKeyboardEvent; | 47 struct NativeWebKeyboardEvent; |
| 47 | 48 |
| 48 // This is the larger RenderWidgetHostView interface exposed only | 49 // This is the larger RenderWidgetHostView interface exposed only |
| 49 // within content/ and to embedders looking to port to new platforms. | 50 // within content/ and to embedders looking to port to new platforms. |
| 50 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. | 51 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. |
| 51 class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView { | 52 class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView { |
| 52 public: | 53 public: |
| 53 virtual ~RenderWidgetHostViewPort() {} | 54 virtual ~RenderWidgetHostViewPort() {} |
| 54 | 55 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 181 const base::Callback<void(bool)>& callback) = 0; | 182 const base::Callback<void(bool)>& callback) = 0; |
| 182 | 183 |
| 183 // Returns true if CopyFromCompositingSurfaceToVideoFrame() is likely to | 184 // Returns true if CopyFromCompositingSurfaceToVideoFrame() is likely to |
| 184 // succeed. | 185 // succeed. |
| 185 // | 186 // |
| 186 // TODO(nick): When VideoFrame copies are broadly implemented, this method | 187 // TODO(nick): When VideoFrame copies are broadly implemented, this method |
| 187 // should be renamed to HasCompositingSurface(), or unified with | 188 // should be renamed to HasCompositingSurface(), or unified with |
| 188 // IsSurfaceAvailableForCopy() and HasAcceleratedSurface(). | 189 // IsSurfaceAvailableForCopy() and HasAcceleratedSurface(). |
| 189 virtual bool CanCopyToVideoFrame() const = 0; | 190 virtual bool CanCopyToVideoFrame() const = 0; |
| 190 | 191 |
| 192 // Return true if frame subscription is supported on this platform. | |
| 193 virtual bool CanSubscribeFrame() const { return false; } | |
|
piman
2013/02/22 20:45:47
note: all methods in this class are pure virtual.
Alpha Left Google
2013/02/22 21:05:38
Okay will do.
| |
| 194 | |
| 195 // Begin subscribing for presentation events and captured frames. | |
| 196 // |subscriber| is now owned by this object, it will be called only on the | |
| 197 // UI thread. | |
| 198 // | |
| 199 // TODO(hclam): Implement this API on all platforms. | |
| 200 virtual void BeginFrameSubscription( | |
| 201 RenderWidgetHostViewFrameSubscriber* subscriber) {} | |
| 202 | |
| 203 // End subscribing for frame presentation events. FrameSubscriber will be | |
| 204 // deleted after this call. | |
| 205 virtual void EndFrameSubscription() {} | |
| 206 | |
| 191 // Called when accelerated compositing state changes. | 207 // Called when accelerated compositing state changes. |
| 192 virtual void OnAcceleratedCompositingStateChange() = 0; | 208 virtual void OnAcceleratedCompositingStateChange() = 0; |
| 193 // |params.window| and |params.surface_id| indicate which accelerated | 209 // |params.window| and |params.surface_id| indicate which accelerated |
| 194 // surface's buffers swapped. |params.renderer_id| and |params.route_id| | 210 // surface's buffers swapped. |params.renderer_id| and |params.route_id| |
| 195 // are used to formulate a reply to the GPU process to prevent it from getting | 211 // are used to formulate a reply to the GPU process to prevent it from getting |
| 196 // too far ahead. They may all be zero, in which case no flow control is | 212 // too far ahead. They may all be zero, in which case no flow control is |
| 197 // enforced; this case is currently used for accelerated plugins. | 213 // enforced; this case is currently used for accelerated plugins. |
| 198 virtual void AcceleratedSurfaceBuffersSwapped( | 214 virtual void AcceleratedSurfaceBuffersSwapped( |
| 199 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel, | 215 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel, |
| 200 int gpu_host_id) = 0; | 216 int gpu_host_id) = 0; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 virtual BrowserAccessibilityManager* | 325 virtual BrowserAccessibilityManager* |
| 310 GetBrowserAccessibilityManager() const = 0; | 326 GetBrowserAccessibilityManager() const = 0; |
| 311 virtual void OnAccessibilityNotifications( | 327 virtual void OnAccessibilityNotifications( |
| 312 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { | 328 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { |
| 313 } | 329 } |
| 314 }; | 330 }; |
| 315 | 331 |
| 316 } // namespace content | 332 } // namespace content |
| 317 | 333 |
| 318 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 334 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
| OLD | NEW |