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

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: no change Created 7 years, 10 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 24 matching lines...) Expand all
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
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 // Begin subscribing for presentation events and captured frames.
ncarter (slow) 2013/02/16 02:45:22 My familiarity with the render_(view|widget).* cod
193 // |subscriber| is now owned by this object, it will be called on the
194 // presentation thread which might not be the UI thread.
ncarter (slow) 2013/02/16 02:45:22 It feels somewhat unstructured, that the code to i
Alpha Left Google 2013/02/20 21:34:50 No we can't guarantee that we can make the decisio
195 //
196 // TODO(hclam): Implement this API on all platforms.
ncarter (slow) 2013/02/16 02:45:22 How does the user of this mechanism know whether B
Alpha Left Google 2013/02/20 21:34:50 I added CanSubscribeFrame().
197 virtual void BeginFrameSubscription(
198 RenderWidgetHostViewFrameSubscriber* subscriber) {}
199
200 // End subscribing for frame presentation events. |subscriber| will be
201 // deleted after this call.
202 virtual void EndFrameSubscription(
203 RenderWidgetHostViewFrameSubscriber* subscriber) {}
ncarter (slow) 2013/02/16 02:45:22 If ownership of |subscriber| passes to the RWHVP,
Alpha Left Google 2013/02/20 21:34:50 The ownership is transferred but WCVCD should keep
204
191 // Called when accelerated compositing state changes. 205 // Called when accelerated compositing state changes.
192 virtual void OnAcceleratedCompositingStateChange() = 0; 206 virtual void OnAcceleratedCompositingStateChange() = 0;
193 // |params.window| and |params.surface_id| indicate which accelerated 207 // |params.window| and |params.surface_id| indicate which accelerated
194 // surface's buffers swapped. |params.renderer_id| and |params.route_id| 208 // 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 209 // 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 210 // 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. 211 // enforced; this case is currently used for accelerated plugins.
198 virtual void AcceleratedSurfaceBuffersSwapped( 212 virtual void AcceleratedSurfaceBuffersSwapped(
199 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel, 213 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel,
200 int gpu_host_id) = 0; 214 int gpu_host_id) = 0;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 virtual BrowserAccessibilityManager* 323 virtual BrowserAccessibilityManager*
310 GetBrowserAccessibilityManager() const = 0; 324 GetBrowserAccessibilityManager() const = 0;
311 virtual void OnAccessibilityNotifications( 325 virtual void OnAccessibilityNotifications(
312 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { 326 const std::vector<AccessibilityHostMsg_NotificationParams>& params) {
313 } 327 }
314 }; 328 };
315 329
316 } // namespace content 330 } // namespace content
317 331
318 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ 332 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698