IndexedDBFactory now ForceCloses databases.
[chromium-blink-merge.git] / content / browser / renderer_host / render_widget_host_view_mac.h
blob0b773555fa4ad762085ada06b67327506c9a3899
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
8 #import <Cocoa/Cocoa.h>
9 #include <list>
10 #include <map>
11 #include <string>
12 #include <utility>
13 #include <vector>
15 #include "base/mac/scoped_nsobject.h"
16 #include "base/memory/scoped_ptr.h"
17 #include "base/memory/weak_ptr.h"
18 #include "base/time/time.h"
19 #include "content/browser/accessibility/browser_accessibility_delegate_mac.h"
20 #include "content/browser/renderer_host/render_widget_host_view_base.h"
21 #include "content/browser/renderer_host/software_frame_manager.h"
22 #include "content/common/edit_command.h"
23 #import "content/public/browser/render_widget_host_view_mac_base.h"
24 #include "ipc/ipc_sender.h"
25 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
26 #include "ui/base/cocoa/base_view.h"
27 #include "webkit/common/cursors/webcursor.h"
29 namespace content {
30 class CompositingIOSurfaceMac;
31 class CompositingIOSurfaceContext;
32 class RenderWidgetHostViewMac;
33 class RenderWidgetHostViewMacEditCommandHelper;
36 @class CompositingIOSurfaceLayer;
37 @class FullscreenWindowManager;
38 @protocol RenderWidgetHostViewMacDelegate;
39 @class ToolTip;
41 @protocol RenderWidgetHostViewMacOwner
42 - (content::RenderWidgetHostViewMac*)renderWidgetHostViewMac;
43 @end
45 // This is the view that lives in the Cocoa view hierarchy. In Windows-land,
46 // RenderWidgetHostViewWin is both the view and the delegate. We split the roles
47 // but that means that the view needs to own the delegate and will dispose of it
48 // when it's removed from the view system.
49 @interface RenderWidgetHostViewCocoa
50 : BaseView <RenderWidgetHostViewMacBase,
51 RenderWidgetHostViewMacOwner,
52 NSTextInputClient,
53 BrowserAccessibilityDelegateCocoa> {
54 @private
55 scoped_ptr<content::RenderWidgetHostViewMac> renderWidgetHostView_;
56 NSObject<RenderWidgetHostViewMacDelegate>* delegate_; // weak
57 BOOL canBeKeyView_;
58 BOOL takesFocusOnlyOnMouseDown_;
59 BOOL closeOnDeactivate_;
60 scoped_ptr<content::RenderWidgetHostViewMacEditCommandHelper>
61 editCommand_helper_;
63 // These are part of the magic tooltip code from WebKit's WebHTMLView:
64 id trackingRectOwner_; // (not retained)
65 void* trackingRectUserData_;
66 NSTrackingRectTag lastToolTipTag_;
67 base::scoped_nsobject<NSString> toolTip_;
69 // Is YES if there was a mouse-down as yet unbalanced with a mouse-up.
70 BOOL hasOpenMouseDown_;
72 NSWindow* lastWindow_; // weak
74 // The cursor for the page. This is passed up from the renderer.
75 base::scoped_nsobject<NSCursor> currentCursor_;
77 // Variables used by our implementaion of the NSTextInput protocol.
78 // An input method of Mac calls the methods of this protocol not only to
79 // notify an application of its status, but also to retrieve the status of
80 // the application. That is, an application cannot control an input method
81 // directly.
82 // This object keeps the status of a composition of the renderer and returns
83 // it when an input method asks for it.
84 // We need to implement Objective-C methods for the NSTextInput protocol. On
85 // the other hand, we need to implement a C++ method for an IPC-message
86 // handler which receives input-method events from the renderer.
88 // Represents the input-method attributes supported by this object.
89 base::scoped_nsobject<NSArray> validAttributesForMarkedText_;
91 // Indicates if we are currently handling a key down event.
92 BOOL handlingKeyDown_;
94 // Indicates if there is any marked text.
95 BOOL hasMarkedText_;
97 // Indicates if unmarkText is called or not when handling a keyboard
98 // event.
99 BOOL unmarkTextCalled_;
101 // The range of current marked text inside the whole content of the DOM node
102 // being edited.
103 // TODO(suzhe): This is currently a fake value, as we do not support accessing
104 // the whole content yet.
105 NSRange markedRange_;
107 // The selected range, cached from a message sent by the renderer.
108 NSRange selectedRange_;
110 // Text to be inserted which was generated by handling a key down event.
111 base::string16 textToBeInserted_;
113 // Marked text which was generated by handling a key down event.
114 base::string16 markedText_;
116 // Underline information of the |markedText_|.
117 std::vector<blink::WebCompositionUnderline> underlines_;
119 // Indicates if doCommandBySelector method receives any edit command when
120 // handling a key down event.
121 BOOL hasEditCommands_;
123 // Contains edit commands received by the -doCommandBySelector: method when
124 // handling a key down event, not including inserting commands, eg. insertTab,
125 // etc.
126 content::EditCommands editCommands_;
128 // The plugin that currently has focus (-1 if no plugin has focus).
129 int focusedPluginIdentifier_;
131 // Whether or not plugin IME is currently enabled active.
132 BOOL pluginImeActive_;
134 // Whether the previous mouse event was ignored due to hitTest check.
135 BOOL mouseEventWasIgnored_;
137 // Event monitor for scroll wheel end event.
138 id endWheelMonitor_;
140 // OpenGL Support:
142 // recursive globalFrameDidChange protection:
143 BOOL handlingGlobalFrameDidChange_;
145 // The scale factor of the display this view is in.
146 float deviceScaleFactor_;
148 // If true then escape key down events are suppressed until the first escape
149 // key up event. (The up event is suppressed as well). This is used by the
150 // flash fullscreen code to avoid sending a key up event without a matching
151 // key down event.
152 BOOL suppressNextEscapeKeyUp_;
155 @property(nonatomic, readonly) NSRange selectedRange;
156 @property(nonatomic, readonly) BOOL suppressNextEscapeKeyUp;
158 - (void)setCanBeKeyView:(BOOL)can;
159 - (void)setTakesFocusOnlyOnMouseDown:(BOOL)b;
160 - (void)setCloseOnDeactivate:(BOOL)b;
161 - (void)setToolTipAtMousePoint:(NSString *)string;
162 // True for always-on-top special windows (e.g. Balloons and Panels).
163 - (BOOL)acceptsMouseEventsWhenInactive;
164 // Cancel ongoing composition (abandon the marked text).
165 - (void)cancelComposition;
166 // Confirm ongoing composition.
167 - (void)confirmComposition;
168 // Enables or disables plugin IME.
169 - (void)setPluginImeActive:(BOOL)active;
170 // Updates the current plugin focus state.
171 - (void)pluginFocusChanged:(BOOL)focused forPlugin:(int)pluginId;
172 // Evaluates the event in the context of plugin IME, if plugin IME is enabled.
173 // Returns YES if the event was handled.
174 - (BOOL)postProcessEventForPluginIme:(NSEvent*)event;
175 - (void)updateCursor:(NSCursor*)cursor;
176 - (NSRect)firstViewRectForCharacterRange:(NSRange)theRange
177 actualRange:(NSRangePointer)actualRange;
178 @end
180 namespace content {
181 class RenderWidgetHostImpl;
183 ///////////////////////////////////////////////////////////////////////////////
184 // RenderWidgetHostViewMac
186 // An object representing the "View" of a rendered web page. This object is
187 // responsible for displaying the content of the web page, and integrating with
188 // the Cocoa view system. It is the implementation of the RenderWidgetHostView
189 // that the cross-platform RenderWidgetHost object uses
190 // to display the data.
192 // Comment excerpted from render_widget_host.h:
194 // "The lifetime of the RenderWidgetHost* is tied to the render process.
195 // If the render process dies, the RenderWidgetHost* goes away and all
196 // references to it must become NULL."
198 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h.
199 class RenderWidgetHostViewMac : public RenderWidgetHostViewBase,
200 public IPC::Sender,
201 public SoftwareFrameManagerClient {
202 public:
203 virtual ~RenderWidgetHostViewMac();
205 RenderWidgetHostViewCocoa* cocoa_view() const { return cocoa_view_; }
207 CONTENT_EXPORT void SetDelegate(
208 NSObject<RenderWidgetHostViewMacDelegate>* delegate);
209 void SetAllowOverlappingViews(bool overlapping);
211 // RenderWidgetHostView implementation.
212 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
213 virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE;
214 virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE;
215 virtual void SetSize(const gfx::Size& size) OVERRIDE;
216 virtual void SetBounds(const gfx::Rect& rect) OVERRIDE;
217 virtual gfx::NativeView GetNativeView() const OVERRIDE;
218 virtual gfx::NativeViewId GetNativeViewId() const OVERRIDE;
219 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE;
220 virtual bool HasFocus() const OVERRIDE;
221 virtual bool IsSurfaceAvailableForCopy() const OVERRIDE;
222 virtual void Show() OVERRIDE;
223 virtual void Hide() OVERRIDE;
224 virtual bool IsShowing() OVERRIDE;
225 virtual gfx::Rect GetViewBounds() const OVERRIDE;
226 virtual void SetShowingContextMenu(bool showing) OVERRIDE;
227 virtual void SetActive(bool active) OVERRIDE;
228 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) OVERRIDE;
229 virtual void SetWindowVisibility(bool visible) OVERRIDE;
230 virtual void WindowFrameChanged() OVERRIDE;
231 virtual void ShowDefinitionForSelection() OVERRIDE;
232 virtual bool SupportsSpeech() const OVERRIDE;
233 virtual void SpeakSelection() OVERRIDE;
234 virtual bool IsSpeaking() const OVERRIDE;
235 virtual void StopSpeaking() OVERRIDE;
236 virtual void SetBackground(const SkBitmap& background) OVERRIDE;
238 // Implementation of RenderWidgetHostViewPort.
239 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view,
240 const gfx::Rect& pos) OVERRIDE;
241 virtual void InitAsFullscreen(
242 RenderWidgetHostView* reference_host_view) OVERRIDE;
243 virtual void WasShown() OVERRIDE;
244 virtual void WasHidden() OVERRIDE;
245 virtual void MovePluginWindows(
246 const gfx::Vector2d& scroll_offset,
247 const std::vector<WebPluginGeometry>& moves) OVERRIDE;
248 virtual void Focus() OVERRIDE;
249 virtual void Blur() OVERRIDE;
250 virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE;
251 virtual void SetIsLoading(bool is_loading) OVERRIDE;
252 virtual void TextInputTypeChanged(ui::TextInputType type,
253 ui::TextInputMode input_mode,
254 bool can_compose_inline) OVERRIDE;
255 virtual void ImeCancelComposition() OVERRIDE;
256 virtual void ImeCompositionRangeChanged(
257 const gfx::Range& range,
258 const std::vector<gfx::Rect>& character_bounds) OVERRIDE;
259 virtual void DidUpdateBackingStore(
260 const gfx::Rect& scroll_rect,
261 const gfx::Vector2d& scroll_delta,
262 const std::vector<gfx::Rect>& copy_rects,
263 const std::vector<ui::LatencyInfo>& latency_info) OVERRIDE;
264 virtual void RenderProcessGone(base::TerminationStatus status,
265 int error_code) OVERRIDE;
266 virtual void Destroy() OVERRIDE;
267 virtual void SetTooltipText(const base::string16& tooltip_text) OVERRIDE;
268 virtual void SelectionChanged(const base::string16& text,
269 size_t offset,
270 const gfx::Range& range) OVERRIDE;
271 virtual void SelectionBoundsChanged(
272 const ViewHostMsg_SelectionBounds_Params& params) OVERRIDE;
273 virtual void ScrollOffsetChanged() OVERRIDE;
274 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE;
275 virtual void CopyFromCompositingSurface(
276 const gfx::Rect& src_subrect,
277 const gfx::Size& dst_size,
278 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE;
279 virtual void CopyFromCompositingSurfaceToVideoFrame(
280 const gfx::Rect& src_subrect,
281 const scoped_refptr<media::VideoFrame>& target,
282 const base::Callback<void(bool)>& callback) OVERRIDE;
283 virtual bool CanCopyToVideoFrame() const OVERRIDE;
284 virtual bool CanSubscribeFrame() const OVERRIDE;
285 virtual void BeginFrameSubscription(
286 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) OVERRIDE;
287 virtual void EndFrameSubscription() OVERRIDE;
288 virtual void OnSwapCompositorFrame(
289 uint32 output_surface_id, scoped_ptr<cc::CompositorFrame> frame) OVERRIDE;
290 virtual void OnAcceleratedCompositingStateChange() OVERRIDE;
291 virtual void AcceleratedSurfaceInitialized(int host_id,
292 int route_id) OVERRIDE;
293 virtual void CreateBrowserAccessibilityManagerIfNeeded() OVERRIDE;
294 virtual bool PostProcessEventForPluginIme(
295 const NativeWebKeyboardEvent& event) OVERRIDE;
297 virtual void AcceleratedSurfaceBuffersSwapped(
298 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
299 int gpu_host_id) OVERRIDE;
300 virtual void AcceleratedSurfacePostSubBuffer(
301 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
302 int gpu_host_id) OVERRIDE;
303 virtual void AcceleratedSurfaceSuspend() OVERRIDE;
304 virtual void AcceleratedSurfaceRelease() OVERRIDE;
305 virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE;
306 virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE;
307 virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
308 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
310 virtual void SetHasHorizontalScrollbar(
311 bool has_horizontal_scrollbar) OVERRIDE;
312 virtual void SetScrollOffsetPinning(
313 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE;
314 virtual bool LockMouse() OVERRIDE;
315 virtual void UnlockMouse() OVERRIDE;
316 virtual void UnhandledWheelEvent(
317 const blink::WebMouseWheelEvent& event) OVERRIDE;
319 // IPC::Sender implementation.
320 virtual bool Send(IPC::Message* message) OVERRIDE;
322 // SoftwareFrameManagerClient implementation:
323 virtual void SoftwareFrameWasFreed(
324 uint32 output_surface_id, unsigned frame_id) OVERRIDE;
325 virtual void ReleaseReferencesToSoftwareFrame() OVERRIDE;
327 // Forwards the mouse event to the renderer.
328 void ForwardMouseEvent(const blink::WebMouseEvent& event);
330 void KillSelf();
332 void SetTextInputActive(bool active);
334 // Change this view to use CoreAnimation to draw.
335 void EnableCoreAnimation();
337 // Sends completed plugin IME notification and text back to the renderer.
338 void PluginImeCompositionCompleted(const base::string16& text, int plugin_id);
340 const std::string& selected_text() const { return selected_text_; }
342 // Update the IOSurface to be drawn and call setNeedsDisplay on
343 // |cocoa_view_|.
344 void CompositorSwapBuffers(uint64 surface_handle,
345 const gfx::Size& size,
346 float scale_factor,
347 const ui::LatencyInfo& latency_info);
349 // Draw the IOSurface by making its context current to this view.
350 bool DrawIOSurfaceWithoutCoreAnimation();
352 // Called when a GPU error is detected. Deletes all compositing state.
353 void GotAcceleratedCompositingError();
355 // Sets the overlay view, which should be drawn in the same IOSurface
356 // atop of this view, if both views are drawing accelerated content.
357 // Overlay is stored as a weak ptr.
358 void SetOverlayView(RenderWidgetHostViewMac* overlay,
359 const gfx::Point& offset);
361 // Removes the previously set overlay view.
362 void RemoveOverlayView();
364 // Returns true and stores first rectangle for character range if the
365 // requested |range| is already cached, otherwise returns false.
366 // Exposed for testing.
367 CONTENT_EXPORT bool GetCachedFirstRectForCharacterRange(
368 NSRange range, NSRect* rect, NSRange* actual_range);
370 // Returns true if there is line break in |range| and stores line breaking
371 // point to |line_breaking_point|. The |line_break_point| is valid only if
372 // this function returns true.
373 bool GetLineBreakIndex(const std::vector<gfx::Rect>& bounds,
374 const gfx::Range& range,
375 size_t* line_break_point);
377 // Returns composition character boundary rectangle. The |range| is
378 // composition based range. Also stores |actual_range| which is corresponding
379 // to actually used range for returned rectangle.
380 gfx::Rect GetFirstRectForCompositionRange(const gfx::Range& range,
381 gfx::Range* actual_range);
383 // Converts from given whole character range to composition oriented range. If
384 // the conversion failed, return gfx::Range::InvalidRange.
385 gfx::Range ConvertCharacterRangeToCompositionRange(
386 const gfx::Range& request_range);
388 // These member variables should be private, but the associated ObjC class
389 // needs access to them and can't be made a friend.
391 // The associated Model. Can be NULL if Destroy() is called when
392 // someone (other than superview) has retained |cocoa_view_|.
393 RenderWidgetHostImpl* render_widget_host_;
395 // This is true when we are currently painting and thus should handle extra
396 // paint requests by expanding the invalid rect rather than actually painting.
397 bool about_to_validate_and_paint_;
399 // This is true when we have already scheduled a call to
400 // |-callSetNeedsDisplayInRect:| but it has not been fulfilled yet. Used to
401 // prevent us from scheduling multiple calls.
402 bool call_set_needs_display_in_rect_pending_;
404 // Whether last rendered frame was accelerated.
405 bool last_frame_was_accelerated_;
407 // The invalid rect that needs to be painted by callSetNeedsDisplayInRect.
408 // This value is only meaningful when
409 // |call_set_needs_display_in_rect_pending_| is true.
410 NSRect invalid_rect_;
412 // The time at which this view started displaying white pixels as a result of
413 // not having anything to paint (empty backing store from renderer). This
414 // value returns true for is_null() if we are not recording whiteout times.
415 base::TimeTicks whiteout_start_time_;
417 // The time it took after this view was selected for it to be fully painted.
418 base::TimeTicks web_contents_switch_paint_time_;
420 // Current text input type.
421 ui::TextInputType text_input_type_;
422 bool can_compose_inline_;
424 base::scoped_nsobject<CALayer> software_layer_;
426 // Accelerated compositing structures. These may be dynamically created and
427 // destroyed together in Create/DestroyCompositedIOSurfaceAndLayer.
428 base::scoped_nsobject<CompositingIOSurfaceLayer> compositing_iosurface_layer_;
429 scoped_ptr<CompositingIOSurfaceMac> compositing_iosurface_;
430 scoped_refptr<CompositingIOSurfaceContext> compositing_iosurface_context_;
432 // This holds the current software compositing framebuffer, if any.
433 scoped_ptr<SoftwareFrameManager> software_frame_manager_;
435 // Whether to allow overlapping views.
436 bool allow_overlapping_views_;
438 // Whether to use the CoreAnimation path to draw content.
439 bool use_core_animation_;
441 std::vector<ui::LatencyInfo> software_latency_info_;
443 NSWindow* pepper_fullscreen_window() const {
444 return pepper_fullscreen_window_;
447 CONTENT_EXPORT void release_pepper_fullscreen_window_for_testing();
449 RenderWidgetHostViewMac* fullscreen_parent_host_view() const {
450 return fullscreen_parent_host_view_;
453 RenderWidgetHostViewFrameSubscriber* frame_subscriber() const {
454 return frame_subscriber_.get();
457 int window_number() const;
459 float scale_factor() const;
461 void SendSoftwareLatencyInfoToHost();
463 private:
464 friend class RenderWidgetHostView;
465 friend class RenderWidgetHostViewMacTest;
467 // The view will associate itself with the given widget. The native view must
468 // be hooked up immediately to the view hierarchy, or else when it is
469 // deleted it will delete this out from under the caller.
470 explicit RenderWidgetHostViewMac(RenderWidgetHost* widget);
472 // Returns whether this render view is a popup (autocomplete window).
473 bool IsPopup() const;
475 // Shuts down the render_widget_host_. This is a separate function so we can
476 // invoke it from the message loop.
477 void ShutdownHost();
479 bool CreateCompositedIOSurface();
480 bool CreateCompositedIOSurfaceLayer();
481 enum DestroyContextBehavior {
482 kLeaveContextBoundToView,
483 kDestroyContext,
485 void DestroyCompositedIOSurfaceAndLayer(DestroyContextBehavior
486 destroy_context_behavior);
488 // Unbind the GL context (if any) that is bound to |cocoa_view_|.
489 void ClearBoundContextDrawable();
491 // Called when a GPU SwapBuffers is received.
492 void GotAcceleratedFrame();
494 // Called when a software DIB is received.
495 void GotSoftwareFrame();
497 void OnPluginFocusChanged(bool focused, int plugin_id);
498 void OnStartPluginIme();
500 // Convert |rect| from the views coordinate (upper-left origin) into
501 // the OpenGL coordinate (lower-left origin) and scale for HiDPI displays.
502 gfx::Rect GetScaledOpenGLPixelRect(const gfx::Rect& rect);
504 // The associated view. This is weak and is inserted into the view hierarchy
505 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the
506 // destructor.
507 RenderWidgetHostViewCocoa* cocoa_view_;
509 // Indicates if the page is loading.
510 bool is_loading_;
512 // The text to be shown in the tooltip, supplied by the renderer.
513 base::string16 tooltip_text_;
515 // Factory used to safely scope delayed calls to ShutdownHost().
516 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
518 // selected text on the renderer.
519 std::string selected_text_;
521 // The window used for popup widgets.
522 base::scoped_nsobject<NSWindow> popup_window_;
524 // The fullscreen window used for pepper flash.
525 base::scoped_nsobject<NSWindow> pepper_fullscreen_window_;
526 base::scoped_nsobject<FullscreenWindowManager> fullscreen_window_manager_;
527 // Our parent host view, if this is fullscreen. NULL otherwise.
528 RenderWidgetHostViewMac* fullscreen_parent_host_view_;
530 // The overlay view which is rendered above this one in the same
531 // accelerated IOSurface.
532 // Overlay view has |underlay_view_| set to this view.
533 base::WeakPtr<RenderWidgetHostViewMac> overlay_view_;
535 // Offset at which overlay view should be rendered.
536 gfx::Point overlay_view_offset_;
538 // The underlay view which this view is rendered above in the same
539 // accelerated IOSurface.
540 // Underlay view has |overlay_view_| set to this view.
541 base::WeakPtr<RenderWidgetHostViewMac> underlay_view_;
543 // Set to true when |underlay_view_| has drawn this view. After that point,
544 // this view should not draw again until |underlay_view_| is changed.
545 bool underlay_view_has_drawn_;
547 // Factory used to safely reference overlay view set in SetOverlayView.
548 base::WeakPtrFactory<RenderWidgetHostViewMac>
549 overlay_view_weak_factory_;
551 // The current composition character range and its bounds.
552 gfx::Range composition_range_;
553 std::vector<gfx::Rect> composition_bounds_;
555 // The current caret bounds.
556 gfx::Rect caret_rect_;
558 // Subscriber that listens to frame presentation events.
559 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_;
561 base::WeakPtrFactory<RenderWidgetHostViewMac>
562 software_frame_weak_ptr_factory_;
563 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
566 } // namespace content
568 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_