OLD | NEW |
---|---|
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 #import <QuartzCore/CALayer.h> | 10 #import <QuartzCore/CALayer.h> |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 // handling a key down event, not including inserting commands, eg. insertTab, | 126 // handling a key down event, not including inserting commands, eg. insertTab, |
127 // etc. | 127 // etc. |
128 EditCommands editCommands_; | 128 EditCommands editCommands_; |
129 } | 129 } |
130 | 130 |
131 @property(assign, nonatomic) NSRect caretRect; | 131 @property(assign, nonatomic) NSRect caretRect; |
132 | 132 |
133 - (void)setCanBeKeyView:(BOOL)can; | 133 - (void)setCanBeKeyView:(BOOL)can; |
134 - (void)setCloseOnDeactivate:(BOOL)b; | 134 - (void)setCloseOnDeactivate:(BOOL)b; |
135 - (void)setToolTipAtMousePoint:(NSString *)string; | 135 - (void)setToolTipAtMousePoint:(NSString *)string; |
136 // Makes sure that the initial layer setup for accelerated plugin drawing has | |
137 // been done. Can be called multiple times. | |
138 - (void)ensureAcceleratedPluginLayer; | |
139 // Triggers a refresh of the accelerated plugin layer; should be called whenever | 136 // Triggers a refresh of the accelerated plugin layer; should be called whenever |
140 // the shared surface for one of the plugins is updated. | 137 // the shared surface for one of the plugins is updated. |
141 - (void)drawAcceleratedPluginLayer; | 138 - (void)drawAcceleratedPluginLayer; |
stuartmorgan
2010/08/11 16:40:44
This method is now completely unused, and needs to
Ken Russell (switch to Gerrit)
2010/08/14 02:12:11
Will delete this and other related code.
| |
142 // Set frame, then notify the RenderWidgetHost that the frame has been changed, | 139 // Set frame, then notify the RenderWidgetHost that the frame has been changed, |
143 // but do it in a separate task, using |performSelector:withObject:afterDelay:|. | 140 // but do it in a separate task, using |performSelector:withObject:afterDelay:|. |
144 // This stops the flickering issue in http://crbug.com/31970 | 141 // This stops the flickering issue in http://crbug.com/31970 |
145 - (void)setFrameWithDeferredUpdate:(NSRect)frame; | 142 - (void)setFrameWithDeferredUpdate:(NSRect)frame; |
146 // Notify the RenderWidgetHost that the frame was updated so it can resize | 143 // Notify the RenderWidgetHost that the frame was updated so it can resize |
147 // its contents. | 144 // its contents. |
148 - (void)renderWidgetHostWasResized; | 145 - (void)renderWidgetHostWasResized; |
149 // Cancel ongoing composition (abandon the marked text). | 146 // Cancel ongoing composition (abandon the marked text). |
150 - (void)cancelComposition; | 147 - (void)cancelComposition; |
151 // Set the new accessibility tree. | 148 // Set the new accessibility tree. |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
236 virtual void AcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window, | 233 virtual void AcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window, |
237 int32 width, | 234 int32 width, |
238 int32 height, | 235 int32 height, |
239 uint64 io_surface_identifier); | 236 uint64 io_surface_identifier); |
240 virtual void AcceleratedSurfaceSetTransportDIB( | 237 virtual void AcceleratedSurfaceSetTransportDIB( |
241 gfx::PluginWindowHandle window, | 238 gfx::PluginWindowHandle window, |
242 int32 width, | 239 int32 width, |
243 int32 height, | 240 int32 height, |
244 TransportDIB::Handle transport_dib); | 241 TransportDIB::Handle transport_dib); |
245 virtual void AcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window); | 242 virtual void AcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window); |
246 // Draws the current GPU-accelerated plug-in instances into the given context. | 243 void DrawAcceleratedSurfaceInstance( |
247 virtual void DrawAcceleratedSurfaceInstances(CGLContextObj context); | 244 CGLContextObj context, gfx::PluginWindowHandle plugin_handle); |
248 // Informs the plug-in instances that their drawing context has changed. | 245 // Informs the plug-in instances that their drawing context has changed. |
stuartmorgan
2010/08/11 16:40:44
Comment and function are now mismatched.
Ken Russell (switch to Gerrit)
2010/08/14 02:12:11
Will fix.
| |
249 virtual void AcceleratedSurfaceContextChanged(); | 246 void ForceTextureReload(); |
250 | 247 |
251 virtual void SetVisuallyDeemphasized(bool deemphasized); | 248 virtual void SetVisuallyDeemphasized(bool deemphasized); |
252 | 249 |
253 void KillSelf(); | 250 void KillSelf(); |
254 | 251 |
255 void set_parent_view(NSView* parent_view) { parent_view_ = parent_view; } | 252 void set_parent_view(NSView* parent_view) { parent_view_ = parent_view; } |
256 | 253 |
257 void SetTextInputActive(bool active); | 254 void SetTextInputActive(bool active); |
258 | 255 |
259 // These member variables should be private, but the associated ObjC class | 256 // These member variables should be private, but the associated ObjC class |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
298 void ShutdownHost(); | 295 void ShutdownHost(); |
299 | 296 |
300 // The associated view. This is weak and is inserted into the view hierarchy | 297 // The associated view. This is weak and is inserted into the view hierarchy |
301 // to own this RenderWidgetHostViewMac object unless is_popup_menu_ is true. | 298 // to own this RenderWidgetHostViewMac object unless is_popup_menu_ is true. |
302 // In that case, cocoa_view_ is never inserted into the view hierarchy, so | 299 // In that case, cocoa_view_ is never inserted into the view hierarchy, so |
303 // the RenderWidgetHostViewMac will treat it as a strong reference and will | 300 // the RenderWidgetHostViewMac will treat it as a strong reference and will |
304 // release it when told to destroy (for example, because a pop-up menu has | 301 // release it when told to destroy (for example, because a pop-up menu has |
305 // closed). | 302 // closed). |
306 RenderWidgetHostViewCocoa* cocoa_view_; | 303 RenderWidgetHostViewCocoa* cocoa_view_; |
307 | 304 |
305 typedef std::map<gfx::PluginWindowHandle, NSView*> PluginViewMap; | |
306 PluginViewMap plugin_views_; // Weak values. | |
307 | |
308 // The cursor for the page. This is passed up from the renderer. | 308 // The cursor for the page. This is passed up from the renderer. |
309 WebCursor current_cursor_; | 309 WebCursor current_cursor_; |
310 | 310 |
311 // Indicates if the page is loading. | 311 // Indicates if the page is loading. |
312 bool is_loading_; | 312 bool is_loading_; |
313 | 313 |
314 // true if the View is not visible. | 314 // true if the View is not visible. |
315 bool is_hidden_; | 315 bool is_hidden_; |
316 | 316 |
317 // True if the widget is a native popup menu. The renderer code calls this | 317 // True if the widget is a native popup menu. The renderer code calls this |
(...skipping 12 matching lines...) Expand all Loading... | |
330 // Helper class for managing instances of accelerated plug-ins. | 330 // Helper class for managing instances of accelerated plug-ins. |
331 AcceleratedSurfaceContainerManagerMac plugin_container_manager_; | 331 AcceleratedSurfaceContainerManagerMac plugin_container_manager_; |
332 | 332 |
333 // Whether or not web accessibility is enabled. | 333 // Whether or not web accessibility is enabled. |
334 bool renderer_accessible_; | 334 bool renderer_accessible_; |
335 | 335 |
336 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 336 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
337 }; | 337 }; |
338 | 338 |
339 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 339 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |