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_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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 | 539 |
540 // Shuts down the render_widget_host_. This is a separate function so we can | 540 // Shuts down the render_widget_host_. This is a separate function so we can |
541 // invoke it from the message loop. | 541 // invoke it from the message loop. |
542 void ShutdownHost(); | 542 void ShutdownHost(); |
543 | 543 |
544 void EnsureSoftwareLayer(); | 544 void EnsureSoftwareLayer(); |
545 void DestroySoftwareLayer(); | 545 void DestroySoftwareLayer(); |
546 | 546 |
547 bool EnsureCompositedIOSurface() WARN_UNUSED_RESULT; | 547 bool EnsureCompositedIOSurface() WARN_UNUSED_RESULT; |
548 void EnsureCompositedIOSurfaceLayer(); | 548 void EnsureCompositedIOSurfaceLayer(); |
| 549 enum DestroyCompositedIOSurfaceLayerBehavior { |
| 550 kLeaveLayerInHierarchy, |
| 551 kRemoveLayerFromHierarchy, |
| 552 }; |
| 553 void DestroyCompositedIOSurfaceLayer( |
| 554 DestroyCompositedIOSurfaceLayerBehavior destroy_layer_behavior); |
549 enum DestroyContextBehavior { | 555 enum DestroyContextBehavior { |
550 kLeaveContextBoundToView, | 556 kLeaveContextBoundToView, |
551 kDestroyContext, | 557 kDestroyContext, |
552 }; | 558 }; |
553 void DestroyCompositedIOSurfaceLayer(); | 559 void DestroyCompositedIOSurfaceAndLayer( |
554 void DestroyCompositedIOSurfaceAndLayer(DestroyContextBehavior | 560 DestroyContextBehavior destroy_context_behavior); |
555 destroy_context_behavior); | |
556 | 561 |
557 void DestroyCompositingStateOnError(); | 562 void DestroyCompositingStateOnError(); |
558 | 563 |
559 // Unbind the GL context (if any) that is bound to |cocoa_view_|. | 564 // Unbind the GL context (if any) that is bound to |cocoa_view_|. |
560 void ClearBoundContextDrawable(); | 565 void ClearBoundContextDrawable(); |
561 | 566 |
562 // Called when a GPU SwapBuffers is received. | 567 // Called when a GPU SwapBuffers is received. |
563 void GotAcceleratedFrame(); | 568 void GotAcceleratedFrame(); |
564 | 569 |
565 // Called when a software DIB is received. | 570 // Called when a software DIB is received. |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; | 645 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; |
641 | 646 |
642 base::WeakPtrFactory<RenderWidgetHostViewMac> | 647 base::WeakPtrFactory<RenderWidgetHostViewMac> |
643 software_frame_weak_ptr_factory_; | 648 software_frame_weak_ptr_factory_; |
644 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 649 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
645 }; | 650 }; |
646 | 651 |
647 } // namespace content | 652 } // namespace content |
648 | 653 |
649 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 654 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |