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 <IOSurface/IOSurfaceAPI.h>
17 #include "base/mac/scoped_nsobject.h"
18 #include "base/memory/scoped_ptr.h"
19 #include "base/memory/weak_ptr.h"
20 #include "base/time/time.h"
21 #include "content/browser/compositor/browser_compositor_view_mac.h"
22 #include "content/browser/compositor/delegated_frame_host.h"
23 #include "content/browser/renderer_host/display_link_mac.h"
24 #include "content/browser/renderer_host/input/mouse_wheel_rails_filter_mac.h"
25 #include "content/browser/renderer_host/render_widget_host_view_base.h"
26 #include "content/common/content_export.h"
27 #include "content/common/cursors/webcursor.h"
28 #include "content/common/edit_command.h"
29 #import "content/public/browser/render_widget_host_view_mac_base.h"
30 #include "ipc/ipc_sender.h"
31 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
32 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
33 #include "ui/accelerated_widget_mac/io_surface_layer.h"
34 #include "ui/base/cocoa/base_view.h"
35 #include "ui/base/cocoa/remote_layer_api.h"
36 #include "ui/gfx/display_observer.h"
39 class RenderWidgetHostImpl
;
40 class RenderWidgetHostViewMac
;
41 class RenderWidgetHostViewMacEditCommandHelper
;
50 @
class FullscreenWindowManager
;
51 @protocol RenderWidgetHostViewMacDelegate
;
54 @protocol RenderWidgetHostViewMacOwner
55 - (content::RenderWidgetHostViewMac
*)renderWidgetHostViewMac
;
58 // This is the view that lives in the Cocoa view hierarchy. In Windows-land,
59 // RenderWidgetHostViewWin is both the view and the delegate. We split the roles
60 // but that means that the view needs to own the delegate and will dispose of it
61 // when it's removed from the view system.
62 @interface RenderWidgetHostViewCocoa
63 : BaseView
<RenderWidgetHostViewMacBase
,
64 RenderWidgetHostViewMacOwner
,
67 scoped_ptr
<content::RenderWidgetHostViewMac
> renderWidgetHostView_
;
68 // This ivar is the cocoa delegate of the NSResponder.
69 base::scoped_nsobject
<NSObject
<RenderWidgetHostViewMacDelegate
>>
72 BOOL closeOnDeactivate_
;
74 scoped_ptr
<content::RenderWidgetHostViewMacEditCommandHelper
>
77 // These are part of the magic tooltip code from WebKit's WebHTMLView:
78 id trackingRectOwner_
; // (not retained)
79 void* trackingRectUserData_
;
80 NSTrackingRectTag lastToolTipTag_
;
81 base::scoped_nsobject
<NSString
> toolTip_
;
83 // Is YES if there was a mouse-down as yet unbalanced with a mouse-up.
84 BOOL hasOpenMouseDown_
;
86 NSWindow
* lastWindow_
; // weak
88 // The cursor for the page. This is passed up from the renderer.
89 base::scoped_nsobject
<NSCursor
> currentCursor_
;
91 // Variables used by our implementaion of the NSTextInput protocol.
92 // An input method of Mac calls the methods of this protocol not only to
93 // notify an application of its status, but also to retrieve the status of
94 // the application. That is, an application cannot control an input method
96 // This object keeps the status of a composition of the renderer and returns
97 // it when an input method asks for it.
98 // We need to implement Objective-C methods for the NSTextInput protocol. On
99 // the other hand, we need to implement a C++ method for an IPC-message
100 // handler which receives input-method events from the renderer.
102 // Represents the input-method attributes supported by this object.
103 base::scoped_nsobject
<NSArray
> validAttributesForMarkedText_
;
105 // Indicates if we are currently handling a key down event.
106 BOOL handlingKeyDown_
;
108 // Indicates if there is any marked text.
111 // Indicates if unmarkText is called or not when handling a keyboard
113 BOOL unmarkTextCalled_
;
115 // The range of current marked text inside the whole content of the DOM node
117 // TODO(suzhe): This is currently a fake value, as we do not support accessing
118 // the whole content yet.
119 NSRange markedRange_
;
121 // The selected range, cached from a message sent by the renderer.
122 NSRange selectedRange_
;
124 // Text to be inserted which was generated by handling a key down event.
125 base::string16 textToBeInserted_
;
127 // Marked text which was generated by handling a key down event.
128 base::string16 markedText_
;
130 // Underline information of the |markedText_|.
131 std::vector
<blink::WebCompositionUnderline
> underlines_
;
133 // Indicates if doCommandBySelector method receives any edit command when
134 // handling a key down event.
135 BOOL hasEditCommands_
;
137 // Contains edit commands received by the -doCommandBySelector: method when
138 // handling a key down event, not including inserting commands, eg. insertTab,
140 content::EditCommands editCommands_
;
142 // The plugin that currently has focus (-1 if no plugin has focus).
143 int focusedPluginIdentifier_
;
145 // Whether or not plugin IME is currently enabled active.
146 BOOL pluginImeActive_
;
148 // Whether the previous mouse event was ignored due to hitTest check.
149 BOOL mouseEventWasIgnored_
;
151 // Event monitor for scroll wheel end event.
154 // When a gesture starts, the system does not inform the view of which type
155 // of gesture is happening (magnify, rotate, etc), rather, it just informs
156 // the view that some as-yet-undefined gesture is starting. Capture the
157 // information about the gesture's beginning event here. It will be used to
158 // create a specific gesture begin event later.
159 scoped_ptr
<blink::WebGestureEvent
> gestureBeginEvent_
;
161 // To avoid accidental pinches, require that a certain zoom threshold be
162 // reached before forwarding it to the browser. Use |unusedPinchAmount_| to
163 // hold this value. If the user reaches this value, don't re-require the
164 // threshold be reached until a certain time has passed since the last
165 // zoom. Store the time of the last zoom in |lastUsedPinchEventTimestamp_|.
166 float unusedPinchAmount_
;
167 NSTimeInterval lastUsedPinchEventTimestamp_
;
169 // This is set if a GesturePinchBegin event has been sent in the lifetime of
170 // |gestureBeginEvent_|. If set, a GesturePinchEnd will be sent when the
172 BOOL gestureBeginPinchSent_
;
174 // If true then escape key down events are suppressed until the first escape
175 // key up event. (The up event is suppressed as well). This is used by the
176 // flash fullscreen code to avoid sending a key up event without a matching
178 BOOL suppressNextEscapeKeyUp_
;
180 // The set of key codes from key down events that we haven't seen the matching
181 // key up events yet.
182 // Used for filtering out non-matching NSKeyUp events.
183 std::set
<unsigned short> keyDownCodes_
;
185 // The filter used to guide touch events towards a horizontal or vertical
187 content::MouseWheelRailsFilterMac mouseWheelFilter_
;
190 @
property(nonatomic
, readonly
) NSRange selectedRange
;
191 @
property(nonatomic
, readonly
) BOOL suppressNextEscapeKeyUp
;
193 - (void)setCanBeKeyView
:(BOOL
)can
;
194 - (void)setCloseOnDeactivate
:(BOOL
)b
;
195 - (void)setOpaque
:(BOOL
)opaque
;
196 - (void)setToolTipAtMousePoint
:(NSString
*)string
;
197 // True for always-on-top special windows (e.g. Balloons and Panels).
198 - (BOOL
)acceptsMouseEventsWhenInactive
;
199 // Cancel ongoing composition (abandon the marked text).
200 - (void)cancelComposition
;
201 // Confirm ongoing composition.
202 - (void)confirmComposition
;
203 // Enables or disables plugin IME.
204 - (void)setPluginImeActive
:(BOOL
)active
;
205 // Updates the current plugin focus state.
206 - (void)pluginFocusChanged
:(BOOL
)focused forPlugin
:(int)pluginId
;
207 // Evaluates the event in the context of plugin IME, if plugin IME is enabled.
208 // Returns YES if the event was handled.
209 - (BOOL
)postProcessEventForPluginIme
:(NSEvent
*)event
;
210 - (void)updateCursor
:(NSCursor
*)cursor
;
211 - (NSRect
)firstViewRectForCharacterRange
:(NSRange
)theRange
212 actualRange
:(NSRangePointer
)actualRange
;
217 ///////////////////////////////////////////////////////////////////////////////
218 // RenderWidgetHostViewMac
220 // An object representing the "View" of a rendered web page. This object is
221 // responsible for displaying the content of the web page, and integrating with
222 // the Cocoa view system. It is the implementation of the RenderWidgetHostView
223 // that the cross-platform RenderWidgetHost object uses
224 // to display the data.
226 // Comment excerpted from render_widget_host.h:
228 // "The lifetime of the RenderWidgetHost* is tied to the render process.
229 // If the render process dies, the RenderWidgetHost* goes away and all
230 // references to it must become NULL."
232 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h.
233 class CONTENT_EXPORT RenderWidgetHostViewMac
234 : public RenderWidgetHostViewBase
,
235 public DelegatedFrameHostClient
,
236 public ui::AcceleratedWidgetMacNSView
,
238 public gfx::DisplayObserver
{
240 // The view will associate itself with the given widget. The native view must
241 // be hooked up immediately to the view hierarchy, or else when it is
242 // deleted it will delete this out from under the caller.
244 // When |is_guest_view_hack| is true, this view isn't really the view for
245 // the |widget|, a RenderWidgetHostViewGuest is.
246 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated
247 // to use RWHVChildFrame (http://crbug.com/330264).
248 RenderWidgetHostViewMac(RenderWidgetHost
* widget
, bool is_guest_view_hack
);
249 ~RenderWidgetHostViewMac() override
;
251 RenderWidgetHostViewCocoa
* cocoa_view() const { return cocoa_view_
; }
253 // |delegate| is used to separate out the logic from the NSResponder delegate.
254 // |delegate| is retained by this class.
255 // |delegate| should be set at most once.
256 CONTENT_EXPORT
void SetDelegate(
257 NSObject
<RenderWidgetHostViewMacDelegate
>* delegate
);
258 void SetAllowPauseForResizeOrRepaint(bool allow
);
260 // RenderWidgetHostView implementation.
261 bool OnMessageReceived(const IPC::Message
& msg
) override
;
262 void InitAsChild(gfx::NativeView parent_view
) override
;
263 RenderWidgetHost
* GetRenderWidgetHost() const override
;
264 void SetSize(const gfx::Size
& size
) override
;
265 void SetBounds(const gfx::Rect
& rect
) override
;
266 gfx::Vector2dF
GetLastScrollOffset() const override
;
267 gfx::NativeView
GetNativeView() const override
;
268 gfx::NativeViewId
GetNativeViewId() const override
;
269 gfx::NativeViewAccessible
GetNativeViewAccessible() override
;
270 bool HasFocus() const override
;
271 bool IsSurfaceAvailableForCopy() const override
;
272 void Show() override
;
273 void Hide() override
;
274 bool IsShowing() override
;
275 void WasUnOccluded() override
;
276 void WasOccluded() override
;
277 gfx::Rect
GetViewBounds() const override
;
278 void SetShowingContextMenu(bool showing
) override
;
279 void SetActive(bool active
) override
;
280 void SetWindowVisibility(bool visible
) override
;
281 void WindowFrameChanged() override
;
282 void ShowDefinitionForSelection() override
;
283 bool SupportsSpeech() const override
;
284 void SpeakSelection() override
;
285 bool IsSpeaking() const override
;
286 void StopSpeaking() override
;
287 void SetBackgroundColor(SkColor color
) override
;
289 // Implementation of RenderWidgetHostViewBase.
290 void InitAsPopup(RenderWidgetHostView
* parent_host_view
,
291 const gfx::Rect
& pos
) override
;
292 void InitAsFullscreen(RenderWidgetHostView
* reference_host_view
) override
;
293 void MovePluginWindows(const std::vector
<WebPluginGeometry
>& moves
) override
;
294 void Focus() override
;
295 void Blur() override
;
296 void UpdateCursor(const WebCursor
& cursor
) override
;
297 void SetIsLoading(bool is_loading
) override
;
298 void TextInputTypeChanged(ui::TextInputType type
,
299 ui::TextInputMode input_mode
,
300 bool can_compose_inline
,
302 void ImeCancelComposition() override
;
303 void ImeCompositionRangeChanged(
304 const gfx::Range
& range
,
305 const std::vector
<gfx::Rect
>& character_bounds
) override
;
306 void RenderProcessGone(base::TerminationStatus status
,
307 int error_code
) override
;
308 void RenderWidgetHostGone() override
;
309 void Destroy() override
;
310 void SetTooltipText(const base::string16
& tooltip_text
) override
;
311 void SelectionChanged(const base::string16
& text
,
313 const gfx::Range
& range
) override
;
314 void SelectionBoundsChanged(
315 const ViewHostMsg_SelectionBounds_Params
& params
) override
;
316 void CopyFromCompositingSurface(const gfx::Rect
& src_subrect
,
317 const gfx::Size
& dst_size
,
318 ReadbackRequestCallback
& callback
,
319 SkColorType color_type
) override
;
320 void CopyFromCompositingSurfaceToVideoFrame(
321 const gfx::Rect
& src_subrect
,
322 const scoped_refptr
<media::VideoFrame
>& target
,
323 const base::Callback
<void(bool)>& callback
) override
;
324 bool CanCopyToVideoFrame() const override
;
325 bool CanSubscribeFrame() const override
;
326 void BeginFrameSubscription(
327 scoped_ptr
<RenderWidgetHostViewFrameSubscriber
> subscriber
) override
;
328 void EndFrameSubscription() override
;
329 void OnSwapCompositorFrame(uint32 output_surface_id
,
330 scoped_ptr
<cc::CompositorFrame
> frame
) override
;
331 BrowserAccessibilityManager
* CreateBrowserAccessibilityManager(
332 BrowserAccessibilityDelegate
* delegate
) override
;
333 gfx::Point
AccessibilityOriginInScreen(const gfx::Rect
& bounds
) override
;
334 void AccessibilityShowMenu(const gfx::Point
& point
) override
;
335 bool PostProcessEventForPluginIme(
336 const NativeWebKeyboardEvent
& event
) override
;
338 bool HasAcceleratedSurface(const gfx::Size
& desired_size
) override
;
339 void GetScreenInfo(blink::WebScreenInfo
* results
) override
;
340 gfx::Rect
GetBoundsInRootWindow() override
;
341 gfx::GLSurfaceHandle
GetCompositingSurface() override
;
343 bool LockMouse() override
;
344 void UnlockMouse() override
;
345 void WheelEventAck(const blink::WebMouseWheelEvent
& event
,
346 InputEventAckState ack_result
) override
;
348 // IPC::Sender implementation.
349 bool Send(IPC::Message
* message
) override
;
351 SkColorType
PreferredReadbackFormat() override
;
353 // gfx::DisplayObserver implementation.
354 void OnDisplayAdded(const gfx::Display
& new_display
) override
;
355 void OnDisplayRemoved(const gfx::Display
& old_display
) override
;
356 void OnDisplayMetricsChanged(const gfx::Display
& display
,
357 uint32_t metrics
) override
;
359 // Forwards the mouse event to the renderer.
360 void ForwardMouseEvent(const blink::WebMouseEvent
& event
);
364 void SetTextInputActive(bool active
);
366 // Sends completed plugin IME notification and text back to the renderer.
367 void PluginImeCompositionCompleted(const base::string16
& text
, int plugin_id
);
369 const std::string
& selected_text() const { return selected_text_
; }
371 // Returns true and stores first rectangle for character range if the
372 // requested |range| is already cached, otherwise returns false.
373 // Exposed for testing.
374 CONTENT_EXPORT
bool GetCachedFirstRectForCharacterRange(
375 NSRange range
, NSRect
* rect
, NSRange
* actual_range
);
377 // Returns true if there is line break in |range| and stores line breaking
378 // point to |line_breaking_point|. The |line_break_point| is valid only if
379 // this function returns true.
380 bool GetLineBreakIndex(const std::vector
<gfx::Rect
>& bounds
,
381 const gfx::Range
& range
,
382 size_t* line_break_point
);
384 // Returns composition character boundary rectangle. The |range| is
385 // composition based range. Also stores |actual_range| which is corresponding
386 // to actually used range for returned rectangle.
387 gfx::Rect
GetFirstRectForCompositionRange(const gfx::Range
& range
,
388 gfx::Range
* actual_range
);
390 // Converts from given whole character range to composition oriented range. If
391 // the conversion failed, return gfx::Range::InvalidRange.
392 gfx::Range
ConvertCharacterRangeToCompositionRange(
393 const gfx::Range
& request_range
);
395 WebContents
* GetWebContents();
397 // These member variables should be private, but the associated ObjC class
398 // needs access to them and can't be made a friend.
400 // The associated Model. Can be NULL if Destroy() is called when
401 // someone (other than superview) has retained |cocoa_view_|.
402 RenderWidgetHostImpl
* render_widget_host_
;
404 // Current text input type.
405 ui::TextInputType text_input_type_
;
406 bool can_compose_inline_
;
408 // The background CoreAnimation layer which is hosted by |cocoa_view_|.
409 base::scoped_nsobject
<CALayer
> background_layer_
;
411 // The state of |delegated_frame_host_| and |browser_compositor_| to
412 // manage being visible, hidden, or occluded.
413 enum BrowserCompositorViewState
{
415 // - |browser_compositor_| exists and |delegated_frame_host_| is
418 // - |render_widet_host_| is in the visible state (this includes when
419 // the tab isn't visible, but tab capture is enabled).
420 BrowserCompositorActive
,
422 // - |browser_compositor_| exists, but |delegated_frame_host_| has
425 // - The |render_widget_host_| is hidden, but |cocoa_view_| is still in the
426 // NSWindow hierarchy.
427 // - This happens when |cocoa_view_| is hidden (minimized, on another
428 // occluded by other windows, etc). The |browser_compositor_| and
429 // its CALayers are kept around so that we will have content to show when
430 // we are un-occluded.
431 BrowserCompositorSuspended
,
433 // - |browser_compositor_| has been destroyed and
434 // |delegated_frame_host_| has been hidden.
436 // - The |render_widget_host_| is hidden or dead, and |cocoa_view_| is not
437 // attached to a NSWindow.
438 // - This happens for backgrounded tabs.
439 BrowserCompositorDestroyed
,
441 BrowserCompositorViewState browser_compositor_state_
;
443 // Delegated frame management and compositior.
444 scoped_ptr
<DelegatedFrameHost
> delegated_frame_host_
;
445 scoped_ptr
<ui::Layer
> root_layer_
;
447 // Container for ui::Compositor the CALayer tree drawn by it.
448 scoped_ptr
<BrowserCompositorMac
> browser_compositor_
;
450 // Placeholder that is allocated while browser_compositor_ is NULL,
451 // indicating that a BrowserCompositorViewMac may be allocated. This is to
452 // help in recycling the internals of BrowserCompositorViewMac.
453 scoped_ptr
<BrowserCompositorMacPlaceholder
>
454 browser_compositor_placeholder_
;
456 NSWindow
* pepper_fullscreen_window() const {
457 return pepper_fullscreen_window_
;
460 CONTENT_EXPORT
void release_pepper_fullscreen_window_for_testing();
462 RenderWidgetHostViewMac
* fullscreen_parent_host_view() const {
463 return fullscreen_parent_host_view_
;
466 int window_number() const;
468 // The scale factor for the screen that the view is currently on.
469 float ViewScaleFactor() const;
471 // Update the scale factor for the backing store and for any CALayers.
472 void UpdateBackingStoreScaleFactor();
474 // Ensure that the display link is associated with the correct display.
475 void UpdateDisplayLink();
477 void PauseForPendingResizeOrRepaintsAndDraw();
479 // DelegatedFrameHostClient implementation.
480 ui::Layer
* DelegatedFrameHostGetLayer() const override
;
481 bool DelegatedFrameHostIsVisible() const override
;
482 gfx::Size
DelegatedFrameHostDesiredSizeInDIP() const override
;
483 bool DelegatedFrameCanCreateResizeLock() const override
;
484 scoped_ptr
<ResizeLock
> DelegatedFrameHostCreateResizeLock(
485 bool defer_compositor_lock
) override
;
486 void DelegatedFrameHostResizeLockWasReleased() override
;
487 void DelegatedFrameHostSendCompositorSwapAck(
488 int output_surface_id
,
489 const cc::CompositorFrameAck
& ack
) override
;
490 void DelegatedFrameHostSendReclaimCompositorResources(
491 int output_surface_id
,
492 const cc::CompositorFrameAck
& ack
) override
;
493 void DelegatedFrameHostOnLostCompositorResources() override
;
494 void DelegatedFrameHostUpdateVSyncParameters(
495 const base::TimeTicks
& timebase
,
496 const base::TimeDelta
& interval
) override
;
498 // AcceleratedWidgetMacNSView implementation.
499 NSView
* AcceleratedWidgetGetNSView() const override
;
500 bool AcceleratedWidgetShouldIgnoreBackpressure() const override
;
501 void AcceleratedWidgetSwapCompleted(
502 const std::vector
<ui::LatencyInfo
>& latency_info
) override
;
503 void AcceleratedWidgetHitError() override
;
505 // Transition from being in the Suspended state to being in the Destroyed
506 // state, if appropriate (see BrowserCompositorViewState for details).
507 void DestroySuspendedBrowserCompositorViewIfNeeded();
510 friend class RenderWidgetHostViewMacTest
;
512 // Returns whether this render view is a popup (autocomplete window).
513 bool IsPopup() const;
515 // Shuts down the render_widget_host_. This is a separate function so we can
516 // invoke it from the message loop.
519 // Tear down all components of the browser compositor in an order that will
520 // ensure no dangling references.
521 void ShutdownBrowserCompositor();
523 // The state of the the browser compositor and delegated frame host. See
524 // BrowserCompositorViewState for details.
525 void EnsureBrowserCompositorView();
526 void SuspendBrowserCompositorView();
527 void DestroyBrowserCompositorView();
529 // IPC message handlers.
530 void OnPluginFocusChanged(bool focused
, int plugin_id
);
531 void OnStartPluginIme();
532 void OnGetRenderedTextCompleted(const std::string
& text
);
534 // Send updated vsync parameters to the renderer.
535 void SendVSyncParametersToRenderer();
537 // Dispatches a TTS session.
538 void SpeakText(const std::string
& text
);
540 // The associated view. This is weak and is inserted into the view hierarchy
541 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the
543 RenderWidgetHostViewCocoa
* cocoa_view_
;
545 // Indicates if the page is loading.
548 // Whether it's allowed to pause waiting for a new frame.
549 bool allow_pause_for_resize_or_repaint_
;
551 // The last scroll offset of the view.
552 gfx::Vector2dF last_scroll_offset_
;
554 // The text to be shown in the tooltip, supplied by the renderer.
555 base::string16 tooltip_text_
;
557 // True when this view acts as a platform view hack for a
558 // RenderWidgetHostViewGuest.
559 bool is_guest_view_hack_
;
561 // selected text on the renderer.
562 std::string selected_text_
;
564 // The window used for popup widgets.
565 base::scoped_nsobject
<NSWindow
> popup_window_
;
567 // The fullscreen window used for pepper flash.
568 base::scoped_nsobject
<NSWindow
> pepper_fullscreen_window_
;
569 base::scoped_nsobject
<FullscreenWindowManager
> fullscreen_window_manager_
;
570 // Our parent host view, if this is fullscreen. NULL otherwise.
571 RenderWidgetHostViewMac
* fullscreen_parent_host_view_
;
573 // Display link for getting vsync info.
574 scoped_refptr
<DisplayLinkMac
> display_link_
;
576 // The current VSync timebase and interval. This is zero until the first call
577 // to SendVSyncParametersToRenderer(), and refreshed regularly thereafter.
578 base::TimeTicks vsync_timebase_
;
579 base::TimeDelta vsync_interval_
;
581 // The current composition character range and its bounds.
582 gfx::Range composition_range_
;
583 std::vector
<gfx::Rect
> composition_bounds_
;
585 // The current caret bounds.
586 gfx::Rect caret_rect_
;
588 // Factory used to safely scope delayed calls to ShutdownHost().
589 base::WeakPtrFactory
<RenderWidgetHostViewMac
> weak_factory_
;
591 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac
);
594 } // namespace content
596 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_