Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2086)

Side by Side Diff: content/port/browser/render_widget_host_view_port.h

Issue 12277023: Define frame subscription interface and implementation on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac impl Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 25 matching lines...) Expand all
36 struct WebPluginGeometry; 36 struct WebPluginGeometry;
37 } 37 }
38 } 38 }
39 39
40 namespace WebKit { 40 namespace WebKit {
41 struct WebScreenInfo; 41 struct WebScreenInfo;
42 } 42 }
43 43
44 namespace content { 44 namespace content {
45 class BackingStore; 45 class BackingStore;
46 class RenderWidgetHostViewFrameSubscriber;
46 class SmoothScrollGesture; 47 class SmoothScrollGesture;
47 struct NativeWebKeyboardEvent; 48 struct NativeWebKeyboardEvent;
48 49
49 // This is the larger RenderWidgetHostView interface exposed only 50 // This is the larger RenderWidgetHostView interface exposed only
50 // within content/ and to embedders looking to port to new platforms. 51 // within content/ and to embedders looking to port to new platforms.
51 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. 52 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h.
52 class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView, 53 class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView,
53 public IPC::Listener { 54 public IPC::Listener {
54 public: 55 public:
55 virtual ~RenderWidgetHostViewPort() {} 56 virtual ~RenderWidgetHostViewPort() {}
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 const base::Callback<void(bool)>& callback) = 0; 188 const base::Callback<void(bool)>& callback) = 0;
188 189
189 // Returns true if CopyFromCompositingSurfaceToVideoFrame() is likely to 190 // Returns true if CopyFromCompositingSurfaceToVideoFrame() is likely to
190 // succeed. 191 // succeed.
191 // 192 //
192 // TODO(nick): When VideoFrame copies are broadly implemented, this method 193 // TODO(nick): When VideoFrame copies are broadly implemented, this method
193 // should be renamed to HasCompositingSurface(), or unified with 194 // should be renamed to HasCompositingSurface(), or unified with
194 // IsSurfaceAvailableForCopy() and HasAcceleratedSurface(). 195 // IsSurfaceAvailableForCopy() and HasAcceleratedSurface().
195 virtual bool CanCopyToVideoFrame() const = 0; 196 virtual bool CanCopyToVideoFrame() const = 0;
196 197
198 // Return true if frame subscription is supported on this platform.
199 virtual bool CanSubscribeFrame() const = 0;
200
201 // Begin subscribing for presentation events and captured frames.
202 // |subscriber| is now owned by this object, it will be called only on the
203 // UI thread.
204 virtual void BeginFrameSubscription(
205 RenderWidgetHostViewFrameSubscriber* subscriber) = 0;
206
207 // End subscribing for frame presentation events. FrameSubscriber will be
208 // deleted after this call.
209 virtual void EndFrameSubscription() = 0;
210
197 // Called when accelerated compositing state changes. 211 // Called when accelerated compositing state changes.
198 virtual void OnAcceleratedCompositingStateChange() = 0; 212 virtual void OnAcceleratedCompositingStateChange() = 0;
199 // |params.window| and |params.surface_id| indicate which accelerated 213 // |params.window| and |params.surface_id| indicate which accelerated
200 // surface's buffers swapped. |params.renderer_id| and |params.route_id| 214 // surface's buffers swapped. |params.renderer_id| and |params.route_id|
201 // are used to formulate a reply to the GPU process to prevent it from getting 215 // are used to formulate a reply to the GPU process to prevent it from getting
202 // too far ahead. They may all be zero, in which case no flow control is 216 // too far ahead. They may all be zero, in which case no flow control is
203 // enforced; this case is currently used for accelerated plugins. 217 // enforced; this case is currently used for accelerated plugins.
204 virtual void AcceleratedSurfaceBuffersSwapped( 218 virtual void AcceleratedSurfaceBuffersSwapped(
205 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel, 219 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel,
206 int gpu_host_id) = 0; 220 int gpu_host_id) = 0;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 #endif 297 #endif
284 298
285 #if defined(OS_WIN) && !defined(USE_AURA) 299 #if defined(OS_WIN) && !defined(USE_AURA)
286 virtual void WillWmDestroy() = 0; 300 virtual void WillWmDestroy() = 0;
287 #endif 301 #endif
288 }; 302 };
289 303
290 } // namespace content 304 } // namespace content
291 305
292 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ 306 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698