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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.h

Issue 12277023: Define frame subscription interface and implementation on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git fetch 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; 267 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE;
268 virtual void CopyFromCompositingSurface( 268 virtual void CopyFromCompositingSurface(
269 const gfx::Rect& src_subrect, 269 const gfx::Rect& src_subrect,
270 const gfx::Size& dst_size, 270 const gfx::Size& dst_size,
271 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE; 271 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE;
272 virtual void CopyFromCompositingSurfaceToVideoFrame( 272 virtual void CopyFromCompositingSurfaceToVideoFrame(
273 const gfx::Rect& src_subrect, 273 const gfx::Rect& src_subrect,
274 const scoped_refptr<media::VideoFrame>& target, 274 const scoped_refptr<media::VideoFrame>& target,
275 const base::Callback<void(bool)>& callback) OVERRIDE; 275 const base::Callback<void(bool)>& callback) OVERRIDE;
276 virtual bool CanCopyToVideoFrame() const OVERRIDE; 276 virtual bool CanCopyToVideoFrame() const OVERRIDE;
277 virtual bool CanSubscribeFrame() const OVERRIDE;
278 virtual void BeginFrameSubscription(
279 RenderWidgetHostViewFrameSubscriber* subscriber) OVERRIDE;
280 virtual void EndFrameSubscription() OVERRIDE;
277 virtual void OnAcceleratedCompositingStateChange() OVERRIDE; 281 virtual void OnAcceleratedCompositingStateChange() OVERRIDE;
278 virtual void OnAccessibilityNotifications( 282 virtual void OnAccessibilityNotifications(
279 const std::vector<AccessibilityHostMsg_NotificationParams>& params 283 const std::vector<AccessibilityHostMsg_NotificationParams>& params
280 ) OVERRIDE; 284 ) OVERRIDE;
281 virtual bool PostProcessEventForPluginIme( 285 virtual bool PostProcessEventForPluginIme(
282 const NativeWebKeyboardEvent& event) OVERRIDE; 286 const NativeWebKeyboardEvent& event) OVERRIDE;
283 287
284 // Exposed for testing. 288 // Exposed for testing.
285 CONTENT_EXPORT AcceleratedPluginView* ViewForPluginWindowHandle( 289 CONTENT_EXPORT AcceleratedPluginView* ViewForPluginWindowHandle(
286 gfx::PluginWindowHandle window); 290 gfx::PluginWindowHandle window);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 bool allow_overlapping_views_; 422 bool allow_overlapping_views_;
419 423
420 NSWindow* pepper_fullscreen_window() const { 424 NSWindow* pepper_fullscreen_window() const {
421 return pepper_fullscreen_window_; 425 return pepper_fullscreen_window_;
422 } 426 }
423 427
424 RenderWidgetHostViewMac* fullscreen_parent_host_view() const { 428 RenderWidgetHostViewMac* fullscreen_parent_host_view() const {
425 return fullscreen_parent_host_view_; 429 return fullscreen_parent_host_view_;
426 } 430 }
427 431
432 RenderWidgetHostViewFrameSubscriber* frame_subscriber() const {
433 return frame_subscriber_.get();
434 }
435
428 private: 436 private:
429 friend class RenderWidgetHostView; 437 friend class RenderWidgetHostView;
430 friend class RenderWidgetHostViewMacTest; 438 friend class RenderWidgetHostViewMacTest;
431 439
432 // The view will associate itself with the given widget. The native view must 440 // The view will associate itself with the given widget. The native view must
433 // be hooked up immediately to the view hierarchy, or else when it is 441 // be hooked up immediately to the view hierarchy, or else when it is
434 // deleted it will delete this out from under the caller. 442 // deleted it will delete this out from under the caller.
435 explicit RenderWidgetHostViewMac(RenderWidgetHost* widget); 443 explicit RenderWidgetHostViewMac(RenderWidgetHost* widget);
436 444
437 // Returns whether this render view is a popup (autocomplete window). 445 // Returns whether this render view is a popup (autocomplete window).
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 // pairs of (route_id, gpu_host_id). 510 // pairs of (route_id, gpu_host_id).
503 std::list<std::pair<int32, int32> > pending_swap_buffers_acks_; 511 std::list<std::pair<int32, int32> > pending_swap_buffers_acks_;
504 512
505 // The current composition character range and its bounds. 513 // The current composition character range and its bounds.
506 ui::Range composition_range_; 514 ui::Range composition_range_;
507 std::vector<gfx::Rect> composition_bounds_; 515 std::vector<gfx::Rect> composition_bounds_;
508 516
509 // The current caret bounds. 517 // The current caret bounds.
510 gfx::Rect caret_rect_; 518 gfx::Rect caret_rect_;
511 519
520 // Subscriber that listens to frame presentation events.
521 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_;
522
512 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 523 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
513 }; 524 };
514 525
515 } // namespace content 526 } // namespace content
516 527
517 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 528 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698