Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_mac.h

Issue 3185004: Cleanups to well-behaved accelerated plugin CL requested by... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 id trackingRectOwner_; // (not retained) 55 id trackingRectOwner_; // (not retained)
56 void *trackingRectUserData_; 56 void *trackingRectUserData_;
57 NSTrackingRectTag lastToolTipTag_; 57 NSTrackingRectTag lastToolTipTag_;
58 scoped_nsobject<NSString> toolTip_; 58 scoped_nsobject<NSString> toolTip_;
59 59
60 // Is YES if there was a mouse-down as yet unbalanced with a mouse-up. 60 // Is YES if there was a mouse-down as yet unbalanced with a mouse-up.
61 BOOL hasOpenMouseDown_; 61 BOOL hasOpenMouseDown_;
62 62
63 NSWindow* lastWindow_; // weak 63 NSWindow* lastWindow_; // weak
64 64
65 // The Core Animation layer, if any, hosting the accelerated
66 // plugins' and accelerated compositor's output.
67 scoped_nsobject<CALayer> acceleratedPluginLayer_;
68
69 // Variables used by our implementaion of the NSTextInput protocol. 65 // Variables used by our implementaion of the NSTextInput protocol.
70 // An input method of Mac calls the methods of this protocol not only to 66 // An input method of Mac calls the methods of this protocol not only to
71 // notify an application of its status, but also to retrieve the status of 67 // notify an application of its status, but also to retrieve the status of
72 // the application. That is, an application cannot control an input method 68 // the application. That is, an application cannot control an input method
73 // directly. 69 // directly.
74 // This object keeps the status of a composition of the renderer and returns 70 // This object keeps the status of a composition of the renderer and returns
75 // it when an input method asks for it. 71 // it when an input method asks for it.
76 // We need to implement Objective-C methods for the NSTextInput protocol. On 72 // We need to implement Objective-C methods for the NSTextInput protocol. On
77 // the other hand, we need to implement a C++ method for an IPC-message 73 // the other hand, we need to implement a C++ method for an IPC-message
78 // handler which receives input-method events from the renderer. 74 // handler which receives input-method events from the renderer.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // handling a key down event, not including inserting commands, eg. insertTab, 122 // handling a key down event, not including inserting commands, eg. insertTab,
127 // etc. 123 // etc.
128 EditCommands editCommands_; 124 EditCommands editCommands_;
129 } 125 }
130 126
131 @property(assign, nonatomic) NSRect caretRect; 127 @property(assign, nonatomic) NSRect caretRect;
132 128
133 - (void)setCanBeKeyView:(BOOL)can; 129 - (void)setCanBeKeyView:(BOOL)can;
134 - (void)setCloseOnDeactivate:(BOOL)b; 130 - (void)setCloseOnDeactivate:(BOOL)b;
135 - (void)setToolTipAtMousePoint:(NSString *)string; 131 - (void)setToolTipAtMousePoint:(NSString *)string;
136 // Triggers a refresh of the accelerated plugin layer; should be called whenever
137 // the shared surface for one of the plugins is updated.
138 - (void)drawAcceleratedPluginLayer;
139 // Set frame, then notify the RenderWidgetHost that the frame has been changed, 132 // Set frame, then notify the RenderWidgetHost that the frame has been changed,
140 // but do it in a separate task, using |performSelector:withObject:afterDelay:|. 133 // but do it in a separate task, using |performSelector:withObject:afterDelay:|.
141 // This stops the flickering issue in http://crbug.com/31970 134 // This stops the flickering issue in http://crbug.com/31970
142 - (void)setFrameWithDeferredUpdate:(NSRect)frame; 135 - (void)setFrameWithDeferredUpdate:(NSRect)frame;
143 // Notify the RenderWidgetHost that the frame was updated so it can resize 136 // Notify the RenderWidgetHost that the frame was updated so it can resize
144 // its contents. 137 // its contents.
145 - (void)renderWidgetHostWasResized; 138 - (void)renderWidgetHostWasResized;
146 // Cancel ongoing composition (abandon the marked text). 139 // Cancel ongoing composition (abandon the marked text).
147 - (void)cancelComposition; 140 - (void)cancelComposition;
148 // Set the new accessibility tree. 141 // Set the new accessibility tree.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 int32 height, 228 int32 height,
236 uint64 io_surface_identifier); 229 uint64 io_surface_identifier);
237 virtual void AcceleratedSurfaceSetTransportDIB( 230 virtual void AcceleratedSurfaceSetTransportDIB(
238 gfx::PluginWindowHandle window, 231 gfx::PluginWindowHandle window,
239 int32 width, 232 int32 width,
240 int32 height, 233 int32 height,
241 TransportDIB::Handle transport_dib); 234 TransportDIB::Handle transport_dib);
242 virtual void AcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window); 235 virtual void AcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window);
243 void DrawAcceleratedSurfaceInstance( 236 void DrawAcceleratedSurfaceInstance(
244 CGLContextObj context, gfx::PluginWindowHandle plugin_handle); 237 CGLContextObj context, gfx::PluginWindowHandle plugin_handle);
245 // Informs the plug-in instances that their drawing context has changed. 238 // Forces the textures associated with any accelerated plugin instances
239 // to be reloaded.
246 void ForceTextureReload(); 240 void ForceTextureReload();
247 241
248 virtual void SetVisuallyDeemphasized(bool deemphasized); 242 virtual void SetVisuallyDeemphasized(bool deemphasized);
249 243
250 void KillSelf(); 244 void KillSelf();
251 245
252 void set_parent_view(NSView* parent_view) { parent_view_ = parent_view; } 246 void set_parent_view(NSView* parent_view) { parent_view_ = parent_view; }
253 247
254 void SetTextInputActive(bool active); 248 void SetTextInputActive(bool active);
255 249
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 // Helper class for managing instances of accelerated plug-ins. 324 // Helper class for managing instances of accelerated plug-ins.
331 AcceleratedSurfaceContainerManagerMac plugin_container_manager_; 325 AcceleratedSurfaceContainerManagerMac plugin_container_manager_;
332 326
333 // Whether or not web accessibility is enabled. 327 // Whether or not web accessibility is enabled.
334 bool renderer_accessible_; 328 bool renderer_accessible_;
335 329
336 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 330 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
337 }; 331 };
338 332
339 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 333 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698