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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
381 base::TimeDelta interval) OVERRIDE; | 381 base::TimeDelta interval) OVERRIDE; |
382 | 382 |
383 private: | 383 private: |
384 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText); | 384 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText); |
385 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventState); | 385 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventState); |
386 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventSyncAsync); | 386 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventSyncAsync); |
387 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SwapNotifiesWindow); | 387 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SwapNotifiesWindow); |
388 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 388 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
389 SkippedDelegatedFrames); | 389 SkippedDelegatedFrames); |
390 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, OutputSurfaceIdChange); | 390 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, OutputSurfaceIdChange); |
391 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | |
392 DiscardDelegatedFrames); | |
391 | 393 |
392 class WindowObserver; | 394 class WindowObserver; |
393 friend class WindowObserver; | 395 friend class WindowObserver; |
394 #if defined(OS_WIN) | 396 #if defined(OS_WIN) |
395 class TransientWindowObserver; | 397 class TransientWindowObserver; |
396 friend class TransientWindowObserver; | 398 friend class TransientWindowObserver; |
397 #endif | 399 #endif |
400 class DelegatedFrameEvictionObserver : public RendererFrameManagerClient { | |
danakj
2013/10/28 21:39:21
What if this was a class in a standalone file in c
piman
2013/10/28 22:08:38
Done, though I left in c/b/renderer_host, because
| |
401 public: | |
402 explicit DelegatedFrameEvictionObserver(RenderWidgetHostViewAura* view); | |
403 virtual ~DelegatedFrameEvictionObserver(); | |
404 | |
405 void SwappedFrame(bool visible); | |
406 void DiscardedFrame(); | |
407 void SetVisible(bool visible); | |
408 | |
409 private: | |
410 // RendererFrameManagerClient implementation | |
411 virtual void EvictCurrentFrame() OVERRIDE; | |
412 | |
413 RenderWidgetHostViewAura* view_; | |
414 bool has_frame_; | |
415 | |
416 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameEvictionObserver); | |
417 }; | |
418 friend class DelegatedFrameEvictionObserver; | |
398 | 419 |
399 // Overridden from ImageTransportFactoryObserver: | 420 // Overridden from ImageTransportFactoryObserver: |
400 virtual void OnLostResources() OVERRIDE; | 421 virtual void OnLostResources() OVERRIDE; |
401 | 422 |
402 // Overridden from BrowserAccessibilityDelegate: | 423 // Overridden from BrowserAccessibilityDelegate: |
403 virtual void SetAccessibilityFocus(int acc_obj_id) OVERRIDE; | 424 virtual void SetAccessibilityFocus(int acc_obj_id) OVERRIDE; |
404 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE; | 425 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE; |
405 virtual void AccessibilityScrollToMakeVisible( | 426 virtual void AccessibilityScrollToMakeVisible( |
406 int acc_obj_id, gfx::Rect subfocus) OVERRIDE; | 427 int acc_obj_id, gfx::Rect subfocus) OVERRIDE; |
407 virtual void AccessibilityScrollToPoint( | 428 virtual void AccessibilityScrollToPoint( |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
519 const BufferPresentedCallback& ack_callback, | 540 const BufferPresentedCallback& ack_callback, |
520 const scoped_refptr<ui::Texture>& texture_to_return); | 541 const scoped_refptr<ui::Texture>& texture_to_return); |
521 | 542 |
522 void SwapDelegatedFrame( | 543 void SwapDelegatedFrame( |
523 uint32 output_surface_id, | 544 uint32 output_surface_id, |
524 scoped_ptr<cc::DelegatedFrameData> frame_data, | 545 scoped_ptr<cc::DelegatedFrameData> frame_data, |
525 float frame_device_scale_factor, | 546 float frame_device_scale_factor, |
526 const ui::LatencyInfo& latency_info); | 547 const ui::LatencyInfo& latency_info); |
527 void SendDelegatedFrameAck(uint32 output_surface_id); | 548 void SendDelegatedFrameAck(uint32 output_surface_id); |
528 void SendReturnedDelegatedResources(uint32 output_surface_id); | 549 void SendReturnedDelegatedResources(uint32 output_surface_id); |
550 void EvictDelegatedFrame(); | |
529 | 551 |
530 // cc::DelegatedFrameProviderClient implementation. | 552 // cc::DelegatedFrameProviderClient implementation. |
531 virtual void UnusedResourcesAreAvailable() OVERRIDE; | 553 virtual void UnusedResourcesAreAvailable() OVERRIDE; |
532 | 554 |
533 void SwapSoftwareFrame(uint32 output_surface_id, | 555 void SwapSoftwareFrame(uint32 output_surface_id, |
534 scoped_ptr<cc::SoftwareFrameData> frame_data, | 556 scoped_ptr<cc::SoftwareFrameData> frame_data, |
535 float frame_device_scale_factor, | 557 float frame_device_scale_factor, |
536 const ui::LatencyInfo& latency_info); | 558 const ui::LatencyInfo& latency_info); |
537 void SendSoftwareFrameAck(uint32 output_surface_id); | 559 void SendSoftwareFrameAck(uint32 output_surface_id); |
538 void SendReclaimSoftwareFrames(); | 560 void SendReclaimSoftwareFrames(); |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
747 | 769 |
748 ui::LatencyInfo software_latency_info_; | 770 ui::LatencyInfo software_latency_info_; |
749 | 771 |
750 struct ReleasedFrameInfo { | 772 struct ReleasedFrameInfo { |
751 ReleasedFrameInfo(uint32 output_id, unsigned software_frame_id) | 773 ReleasedFrameInfo(uint32 output_id, unsigned software_frame_id) |
752 : output_surface_id(output_id), frame_id(software_frame_id) {} | 774 : output_surface_id(output_id), frame_id(software_frame_id) {} |
753 uint32 output_surface_id; | 775 uint32 output_surface_id; |
754 unsigned frame_id; | 776 unsigned frame_id; |
755 }; | 777 }; |
756 scoped_ptr<ReleasedFrameInfo> released_software_frame_; | 778 scoped_ptr<ReleasedFrameInfo> released_software_frame_; |
779 DelegatedFrameEvictionObserver delegated_frame_eviction_observer_; | |
757 | 780 |
758 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 781 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
759 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 782 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
760 }; | 783 }; |
761 | 784 |
762 } // namespace content | 785 } // namespace content |
763 | 786 |
764 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 787 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |