OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H |
6 #define CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H | 6 #define CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 #include <QuartzCore/QuartzCore.h> | 9 #include <QuartzCore/QuartzCore.h> |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 | 71 |
72 // -globalFrameDidChange: can be called recursively, this counts how often it | 72 // -globalFrameDidChange: can be called recursively, this counts how often it |
73 // holds the CGL lock. | 73 // holds the CGL lock. |
74 int globalFrameDidChangeCGLLockCount_; | 74 int globalFrameDidChangeCGLLockCount_; |
75 } | 75 } |
76 | 76 |
77 - (id)initWithRenderWidgetHostViewMac:(RenderWidgetHostViewMac*)r | 77 - (id)initWithRenderWidgetHostViewMac:(RenderWidgetHostViewMac*)r |
78 pluginHandle:(gfx::PluginWindowHandle)pluginHandle; | 78 pluginHandle:(gfx::PluginWindowHandle)pluginHandle; |
79 - (void)drawView; | 79 - (void)drawView; |
80 | 80 |
81 // Set the view for the GL context and initialize and start the display link | |
82 // thread. | |
83 - (void)setViewForGL; | |
Ken Russell (switch to Gerrit)
2011/06/10 01:30:12
I find this method name confusing because it sound
jbates
2011/06/11 02:00:44
Good point, done.
| |
84 | |
81 // Sets the list of rectangles that should show the web page, rather than the | 85 // Sets the list of rectangles that should show the web page, rather than the |
82 // accelerated plugin. This is used to simulate the iframe-based trick that web | 86 // accelerated plugin. This is used to simulate the iframe-based trick that web |
83 // pages have long used to show web content above windowed plugins on Windows | 87 // pages have long used to show web content above windowed plugins on Windows |
84 // and Linux. | 88 // and Linux. |
85 - (void)setCutoutRects:(NSArray*)cutout_rects; | 89 - (void)setCutoutRects:(NSArray*)cutout_rects; |
86 | 90 |
87 // Updates the number of swap buffers calls that have been requested. | 91 // Updates the number of swap buffers calls that have been requested. |
88 // This is currently called with non-zero values only in response to | 92 // This is currently called with non-zero values only in response to |
89 // updates from the GPU process. For accelerated plugins, all zeros | 93 // updates from the GPU process. For accelerated plugins, all zeros |
90 // are passed, and the view takes this as a hint that no flow control | 94 // are passed, and the view takes this as a hint that no flow control |
91 // or acknowledgment of the swap buffers are desired. | 95 // or acknowledgment of the swap buffers are desired. |
92 - (void)updateSwapBuffersCount:(uint64)count | 96 - (void)updateSwapBuffersCount:(uint64)count |
93 fromRenderer:(int)rendererId | 97 fromRenderer:(int)rendererId |
94 routeId:(int32)routeId | 98 routeId:(int32)routeId |
95 gpuHostId:(int)gpuHostId; | 99 gpuHostId:(int)gpuHostId; |
96 | 100 |
97 // NSViews autorelease subviews when they die. The RWHVMac gets destroyed when | 101 // NSViews autorelease subviews when they die. The RWHVMac gets destroyed when |
98 // RHWVCocoa gets dealloc'd, which means the AcceleratedPluginView child views | 102 // RHWVCocoa gets dealloc'd, which means the AcceleratedPluginView child views |
99 // can be around a little longer than the RWHVMac. This is called when the | 103 // can be around a little longer than the RWHVMac. This is called when the |
100 // RWHVMac is about to be deleted (but it's still valid while this method runs). | 104 // RWHVMac is about to be deleted (but it's still valid while this method runs). |
101 - (void)onRenderWidgetHostViewGone; | 105 - (void)onRenderWidgetHostViewGone; |
102 | 106 |
103 // This _must_ be atomic, since it's accessed from several threads. | 107 // This _must_ be atomic, since it's accessed from several threads. |
104 @property NSSize cachedSize; | 108 @property NSSize cachedSize; |
105 @end | 109 @end |
106 | 110 |
107 #endif // CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H | 111 #endif // CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H |
OLD | NEW |