IndexedDBFactory now ForceCloses databases.
[chromium-blink-merge.git] / content / browser / renderer_host / compositing_iosurface_layer_mac.h
bloba03ab1cb5dfd9beb4711c0576c6979b63177f320
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/scoped_cftyperef.h"
11 #include "base/memory/ref_counted.h"
13 namespace content {
14 class CompositingIOSurfaceContext;
15 class RenderWidgetHostViewMac;
18 // The CoreAnimation layer for drawing accelerated content.
19 @interface CompositingIOSurfaceLayer : CAOpenGLLayer {
20 @private
21 content::RenderWidgetHostViewMac* renderWidgetHostView_;
22 scoped_refptr<content::CompositingIOSurfaceContext> context_;
25 @property(nonatomic, readonly)
26 scoped_refptr<content::CompositingIOSurfaceContext> context;
28 - (id)initWithRenderWidgetHostViewMac:(content::RenderWidgetHostViewMac*)r;
30 // Update the scale factor of the layer to match the scale factor of the
31 // IOSurface.
32 - (void)updateScaleFactor;
34 // Remove this layer from the layer heirarchy, and mark that
35 // |renderWidgetHostView_| is no longer valid and may no longer be dereferenced.
36 - (void)disableCompositing;
38 @end
40 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_