DevTools: cut host and port from webSocketDebuggerUrl in addition to ws:// prefix
[chromium-blink-merge.git] / content / browser / renderer_host / render_widget_host_view_mac.h
blobb7ca5ff04cb38dbf24bbb011bd058e337029e3ec
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>
10 #include <list>
11 #include <map>
12 #include <set>
13 #include <string>
14 #include <utility>
15 #include <vector>
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/input/mouse_wheel_rails_filter_mac.h"
24 #include "content/browser/renderer_host/render_widget_host_view_base.h"
25 #include "content/common/content_export.h"
26 #include "content/common/cursors/webcursor.h"
27 #include "content/common/edit_command.h"
28 #import "content/public/browser/render_widget_host_view_mac_base.h"
29 #include "ipc/ipc_sender.h"
30 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
31 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
32 #include "ui/accelerated_widget_mac/display_link_mac.h"
33 #include "ui/accelerated_widget_mac/io_surface_layer.h"
34 #include "ui/base/cocoa/remote_layer_api.h"
35 #import "ui/base/cocoa/tool_tip_base_view.h"
36 #include "ui/gfx/display_observer.h"
38 namespace content {
39 class RenderWidgetHostImpl;
40 class RenderWidgetHostViewMac;
41 class RenderWidgetHostViewMacEditCommandHelper;
42 class WebContents;
45 namespace ui {
46 class Compositor;
47 class Layer;
50 @class FullscreenWindowManager;
51 @protocol RenderWidgetHostViewMacDelegate;
53 @protocol RenderWidgetHostViewMacOwner
54 - (content::RenderWidgetHostViewMac*)renderWidgetHostViewMac;
55 @end
57 // This is the view that lives in the Cocoa view hierarchy. In Windows-land,
58 // RenderWidgetHostViewWin is both the view and the delegate. We split the roles
59 // but that means that the view needs to own the delegate and will dispose of it
60 // when it's removed from the view system.
61 @interface RenderWidgetHostViewCocoa
62 : ToolTipBaseView<RenderWidgetHostViewMacBase,
63 RenderWidgetHostViewMacOwner,
64 NSTextInputClient> {
65 @private
66 scoped_ptr<content::RenderWidgetHostViewMac> renderWidgetHostView_;
67 // This ivar is the cocoa delegate of the NSResponder.
68 base::scoped_nsobject<NSObject<RenderWidgetHostViewMacDelegate>>
69 responderDelegate_;
70 BOOL canBeKeyView_;
71 BOOL closeOnDeactivate_;
72 BOOL opaque_;
73 scoped_ptr<content::RenderWidgetHostViewMacEditCommandHelper>
74 editCommand_helper_;
76 // Is YES if there was a mouse-down as yet unbalanced with a mouse-up.
77 BOOL hasOpenMouseDown_;
79 NSWindow* lastWindow_; // weak
81 // The cursor for the page. This is passed up from the renderer.
82 base::scoped_nsobject<NSCursor> currentCursor_;
84 // Variables used by our implementaion of the NSTextInput protocol.
85 // An input method of Mac calls the methods of this protocol not only to
86 // notify an application of its status, but also to retrieve the status of
87 // the application. That is, an application cannot control an input method
88 // directly.
89 // This object keeps the status of a composition of the renderer and returns
90 // it when an input method asks for it.
91 // We need to implement Objective-C methods for the NSTextInput protocol. On
92 // the other hand, we need to implement a C++ method for an IPC-message
93 // handler which receives input-method events from the renderer.
95 // Represents the input-method attributes supported by this object.
96 base::scoped_nsobject<NSArray> validAttributesForMarkedText_;
98 // Indicates if we are currently handling a key down event.
99 BOOL handlingKeyDown_;
101 // Indicates if there is any marked text.
102 BOOL hasMarkedText_;
104 // Indicates if unmarkText is called or not when handling a keyboard
105 // event.
106 BOOL unmarkTextCalled_;
108 // The range of current marked text inside the whole content of the DOM node
109 // being edited.
110 // TODO(suzhe): This is currently a fake value, as we do not support accessing
111 // the whole content yet.
112 NSRange markedRange_;
114 // The selected range, cached from a message sent by the renderer.
115 NSRange selectedRange_;
117 // Text to be inserted which was generated by handling a key down event.
118 base::string16 textToBeInserted_;
120 // Marked text which was generated by handling a key down event.
121 base::string16 markedText_;
123 // Underline information of the |markedText_|.
124 std::vector<blink::WebCompositionUnderline> underlines_;
126 // Indicates if doCommandBySelector method receives any edit command when
127 // handling a key down event.
128 BOOL hasEditCommands_;
130 // Contains edit commands received by the -doCommandBySelector: method when
131 // handling a key down event, not including inserting commands, eg. insertTab,
132 // etc.
133 content::EditCommands editCommands_;
135 // The plugin that currently has focus (-1 if no plugin has focus).
136 int focusedPluginIdentifier_;
138 // Whether or not plugin IME is currently enabled active.
139 BOOL pluginImeActive_;
141 // Whether the previous mouse event was ignored due to hitTest check.
142 BOOL mouseEventWasIgnored_;
144 // Event monitor for scroll wheel end event.
145 id endWheelMonitor_;
147 // When a gesture starts, the system does not inform the view of which type
148 // of gesture is happening (magnify, rotate, etc), rather, it just informs
149 // the view that some as-yet-undefined gesture is starting. Capture the
150 // information about the gesture's beginning event here. It will be used to
151 // create a specific gesture begin event later.
152 scoped_ptr<blink::WebGestureEvent> gestureBeginEvent_;
154 // To avoid accidental pinches, require that a certain zoom threshold be
155 // reached before forwarding it to the browser. Use |pinchUnusedAmount_| to
156 // hold this value. If the user reaches this value, don't re-require the
157 // threshold be reached until the page has been zoomed back to page scale of
158 // one.
159 bool pinchHasReachedZoomThreshold_;
160 float pinchUnusedAmount_;
161 NSTimeInterval pinchLastGestureTimestamp_;
163 // This is set if a GesturePinchBegin event has been sent in the lifetime of
164 // |gestureBeginEvent_|. If set, a GesturePinchEnd will be sent when the
165 // gesture ends.
166 BOOL gestureBeginPinchSent_;
168 // If true then escape key down events are suppressed until the first escape
169 // key up event. (The up event is suppressed as well). This is used by the
170 // flash fullscreen code to avoid sending a key up event without a matching
171 // key down event.
172 BOOL suppressNextEscapeKeyUp_;
174 // The set of key codes from key down events that we haven't seen the matching
175 // key up events yet.
176 // Used for filtering out non-matching NSKeyUp events.
177 std::set<unsigned short> keyDownCodes_;
179 // The filter used to guide touch events towards a horizontal or vertical
180 // orientation.
181 content::MouseWheelRailsFilterMac mouseWheelFilter_;
184 @property(nonatomic, readonly) NSRange selectedRange;
185 @property(nonatomic, readonly) BOOL suppressNextEscapeKeyUp;
187 - (void)setCanBeKeyView:(BOOL)can;
188 - (void)setCloseOnDeactivate:(BOOL)b;
189 - (void)setOpaque:(BOOL)opaque;
190 // True for always-on-top special windows (e.g. Balloons and Panels).
191 - (BOOL)acceptsMouseEventsWhenInactive;
192 // Cancel ongoing composition (abandon the marked text).
193 - (void)cancelComposition;
194 // Confirm ongoing composition.
195 - (void)confirmComposition;
196 // Enables or disables plugin IME.
197 - (void)setPluginImeActive:(BOOL)active;
198 // Updates the current plugin focus state.
199 - (void)pluginFocusChanged:(BOOL)focused forPlugin:(int)pluginId;
200 // Evaluates the event in the context of plugin IME, if plugin IME is enabled.
201 // Returns YES if the event was handled.
202 - (BOOL)postProcessEventForPluginIme:(NSEvent*)event;
203 - (void)updateCursor:(NSCursor*)cursor;
204 - (NSRect)firstViewRectForCharacterRange:(NSRange)theRange
205 actualRange:(NSRangePointer)actualRange;
206 @end
208 namespace content {
210 ///////////////////////////////////////////////////////////////////////////////
211 // RenderWidgetHostViewMac
213 // An object representing the "View" of a rendered web page. This object is
214 // responsible for displaying the content of the web page, and integrating with
215 // the Cocoa view system. It is the implementation of the RenderWidgetHostView
216 // that the cross-platform RenderWidgetHost object uses
217 // to display the data.
219 // Comment excerpted from render_widget_host.h:
221 // "The lifetime of the RenderWidgetHost* is tied to the render process.
222 // If the render process dies, the RenderWidgetHost* goes away and all
223 // references to it must become NULL."
225 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h.
226 class CONTENT_EXPORT RenderWidgetHostViewMac
227 : public RenderWidgetHostViewBase,
228 public DelegatedFrameHostClient,
229 public ui::AcceleratedWidgetMacNSView,
230 public IPC::Sender,
231 public gfx::DisplayObserver {
232 public:
233 // The view will associate itself with the given widget. The native view must
234 // be hooked up immediately to the view hierarchy, or else when it is
235 // deleted it will delete this out from under the caller.
237 // When |is_guest_view_hack| is true, this view isn't really the view for
238 // the |widget|, a RenderWidgetHostViewGuest is.
239 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated
240 // to use RWHVChildFrame (http://crbug.com/330264).
241 RenderWidgetHostViewMac(RenderWidgetHost* widget, bool is_guest_view_hack);
242 ~RenderWidgetHostViewMac() override;
244 RenderWidgetHostViewCocoa* cocoa_view() const { return cocoa_view_; }
246 // |delegate| is used to separate out the logic from the NSResponder delegate.
247 // |delegate| is retained by this class.
248 // |delegate| should be set at most once.
249 CONTENT_EXPORT void SetDelegate(
250 NSObject<RenderWidgetHostViewMacDelegate>* delegate);
251 void SetAllowPauseForResizeOrRepaint(bool allow);
253 // RenderWidgetHostView implementation.
254 bool OnMessageReceived(const IPC::Message& msg) override;
255 void InitAsChild(gfx::NativeView parent_view) override;
256 RenderWidgetHost* GetRenderWidgetHost() const override;
257 void SetSize(const gfx::Size& size) override;
258 void SetBounds(const gfx::Rect& rect) override;
259 gfx::Vector2dF GetLastScrollOffset() const override;
260 gfx::NativeView GetNativeView() const override;
261 gfx::NativeViewId GetNativeViewId() const override;
262 gfx::NativeViewAccessible GetNativeViewAccessible() override;
263 bool HasFocus() const override;
264 bool IsSurfaceAvailableForCopy() const override;
265 void Show() override;
266 void Hide() override;
267 bool IsShowing() override;
268 void WasUnOccluded() override;
269 void WasOccluded() override;
270 gfx::Rect GetViewBounds() const override;
271 void SetShowingContextMenu(bool showing) override;
272 void SetActive(bool active) override;
273 void SetWindowVisibility(bool visible) override;
274 void WindowFrameChanged() override;
275 void ShowDefinitionForSelection() override;
276 bool SupportsSpeech() const override;
277 void SpeakSelection() override;
278 bool IsSpeaking() const override;
279 void StopSpeaking() override;
280 void SetBackgroundColor(SkColor color) override;
282 // Implementation of RenderWidgetHostViewBase.
283 void InitAsPopup(RenderWidgetHostView* parent_host_view,
284 const gfx::Rect& pos) override;
285 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override;
286 void MovePluginWindows(const std::vector<WebPluginGeometry>& moves) override;
287 void Focus() override;
288 void UpdateCursor(const WebCursor& cursor) override;
289 void SetIsLoading(bool is_loading) override;
290 void TextInputTypeChanged(ui::TextInputType type,
291 ui::TextInputMode input_mode,
292 bool can_compose_inline,
293 int flags) override;
294 void ImeCancelComposition() override;
295 void ImeCompositionRangeChanged(
296 const gfx::Range& range,
297 const std::vector<gfx::Rect>& character_bounds) override;
298 void RenderProcessGone(base::TerminationStatus status,
299 int error_code) override;
300 void RenderWidgetHostGone() override;
301 void Destroy() override;
302 void SetTooltipText(const base::string16& tooltip_text) override;
303 void SelectionChanged(const base::string16& text,
304 size_t offset,
305 const gfx::Range& range) override;
306 void SelectionBoundsChanged(
307 const ViewHostMsg_SelectionBounds_Params& params) override;
308 void CopyFromCompositingSurface(const gfx::Rect& src_subrect,
309 const gfx::Size& dst_size,
310 ReadbackRequestCallback& callback,
311 SkColorType preferred_color_type) override;
312 void CopyFromCompositingSurfaceToVideoFrame(
313 const gfx::Rect& src_subrect,
314 const scoped_refptr<media::VideoFrame>& target,
315 const base::Callback<void(bool)>& callback) override;
316 bool CanCopyToVideoFrame() const override;
317 bool CanSubscribeFrame() const override;
318 void BeginFrameSubscription(
319 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override;
320 void EndFrameSubscription() override;
321 void OnSwapCompositorFrame(uint32 output_surface_id,
322 scoped_ptr<cc::CompositorFrame> frame) override;
323 BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
324 BrowserAccessibilityDelegate* delegate) override;
325 gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds) override;
326 bool PostProcessEventForPluginIme(
327 const NativeWebKeyboardEvent& event) override;
329 bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
330 void GetScreenInfo(blink::WebScreenInfo* results) override;
331 gfx::Rect GetBoundsInRootWindow() override;
332 gfx::GLSurfaceHandle GetCompositingSurface() override;
334 bool LockMouse() override;
335 void UnlockMouse() override;
336 void WheelEventAck(const blink::WebMouseWheelEvent& event,
337 InputEventAckState ack_result) override;
339 uint32_t GetSurfaceIdNamespace() override;
341 // IPC::Sender implementation.
342 bool Send(IPC::Message* message) override;
344 // gfx::DisplayObserver implementation.
345 void OnDisplayAdded(const gfx::Display& new_display) override;
346 void OnDisplayRemoved(const gfx::Display& old_display) override;
347 void OnDisplayMetricsChanged(const gfx::Display& display,
348 uint32_t metrics) override;
350 // Forwards the mouse event to the renderer.
351 void ForwardMouseEvent(const blink::WebMouseEvent& event);
353 void KillSelf();
355 void SetTextInputActive(bool active);
357 // Sends completed plugin IME notification and text back to the renderer.
358 void PluginImeCompositionCompleted(const base::string16& text, int plugin_id);
360 const std::string& selected_text() const { return selected_text_; }
362 // Returns true and stores first rectangle for character range if the
363 // requested |range| is already cached, otherwise returns false.
364 // Exposed for testing.
365 CONTENT_EXPORT bool GetCachedFirstRectForCharacterRange(
366 NSRange range, NSRect* rect, NSRange* actual_range);
368 // Returns true if there is line break in |range| and stores line breaking
369 // point to |line_breaking_point|. The |line_break_point| is valid only if
370 // this function returns true.
371 bool GetLineBreakIndex(const std::vector<gfx::Rect>& bounds,
372 const gfx::Range& range,
373 size_t* line_break_point);
375 // Returns composition character boundary rectangle. The |range| is
376 // composition based range. Also stores |actual_range| which is corresponding
377 // to actually used range for returned rectangle.
378 gfx::Rect GetFirstRectForCompositionRange(const gfx::Range& range,
379 gfx::Range* actual_range);
381 // Converts from given whole character range to composition oriented range. If
382 // the conversion failed, return gfx::Range::InvalidRange.
383 gfx::Range ConvertCharacterRangeToCompositionRange(
384 const gfx::Range& request_range);
386 WebContents* GetWebContents();
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 // Current text input type.
396 ui::TextInputType text_input_type_;
397 bool can_compose_inline_;
399 // The background CoreAnimation layer which is hosted by |cocoa_view_|.
400 base::scoped_nsobject<CALayer> background_layer_;
402 // The state of |delegated_frame_host_| and |browser_compositor_| to
403 // manage being visible, hidden, or occluded.
404 enum BrowserCompositorViewState {
405 // Effects:
406 // - |browser_compositor_| exists and |delegated_frame_host_| is
407 // visible.
408 // Happens when:
409 // - |render_widet_host_| is in the visible state (this includes when
410 // the tab isn't visible, but tab capture is enabled).
411 BrowserCompositorActive,
412 // Effects:
413 // - |browser_compositor_| exists, but |delegated_frame_host_| has
414 // been hidden.
415 // Happens when:
416 // - The |render_widget_host_| is hidden, but |cocoa_view_| is still in the
417 // NSWindow hierarchy.
418 // - This happens when |cocoa_view_| is hidden (minimized, on another
419 // occluded by other windows, etc). The |browser_compositor_| and
420 // its CALayers are kept around so that we will have content to show when
421 // we are un-occluded.
422 BrowserCompositorSuspended,
423 // Effects:
424 // - |browser_compositor_| has been destroyed and
425 // |delegated_frame_host_| has been hidden.
426 // Happens when:
427 // - The |render_widget_host_| is hidden or dead, and |cocoa_view_| is not
428 // attached to a NSWindow.
429 // - This happens for backgrounded tabs.
430 BrowserCompositorDestroyed,
432 BrowserCompositorViewState browser_compositor_state_;
434 // Delegated frame management and compositor.
435 scoped_ptr<DelegatedFrameHost> delegated_frame_host_;
436 scoped_ptr<ui::Layer> root_layer_;
438 // Container for ui::Compositor the CALayer tree drawn by it.
439 scoped_ptr<BrowserCompositorMac> browser_compositor_;
441 // Placeholder that is allocated while browser_compositor_ is NULL,
442 // indicating that a BrowserCompositorViewMac may be allocated. This is to
443 // help in recycling the internals of BrowserCompositorViewMac.
444 scoped_ptr<BrowserCompositorMacPlaceholder>
445 browser_compositor_placeholder_;
447 // Set when the currently-displayed frame is the minimum scale. Used to
448 // determine if pinch gestures need to be thresholded.
449 bool page_at_minimum_scale_;
451 NSWindow* pepper_fullscreen_window() const {
452 return pepper_fullscreen_window_;
455 CONTENT_EXPORT void release_pepper_fullscreen_window_for_testing();
457 RenderWidgetHostViewMac* fullscreen_parent_host_view() const {
458 return fullscreen_parent_host_view_;
461 int window_number() const;
463 // The scale factor for the screen that the view is currently on.
464 float ViewScaleFactor() const;
466 // Update the scale factor for the backing store and for any CALayers.
467 void UpdateBackingStoreScaleFactor();
469 // Ensure that the display link is associated with the correct display.
470 void UpdateDisplayLink();
472 void PauseForPendingResizeOrRepaintsAndDraw();
474 // DelegatedFrameHostClient implementation.
475 ui::Layer* DelegatedFrameHostGetLayer() const override;
476 bool DelegatedFrameHostIsVisible() const override;
477 gfx::Size DelegatedFrameHostDesiredSizeInDIP() const override;
478 bool DelegatedFrameCanCreateResizeLock() const override;
479 scoped_ptr<ResizeLock> DelegatedFrameHostCreateResizeLock(
480 bool defer_compositor_lock) override;
481 void DelegatedFrameHostResizeLockWasReleased() override;
482 void DelegatedFrameHostSendCompositorSwapAck(
483 int output_surface_id,
484 const cc::CompositorFrameAck& ack) override;
485 void DelegatedFrameHostSendReclaimCompositorResources(
486 int output_surface_id,
487 const cc::CompositorFrameAck& ack) override;
488 void DelegatedFrameHostOnLostCompositorResources() override;
489 void DelegatedFrameHostUpdateVSyncParameters(
490 const base::TimeTicks& timebase,
491 const base::TimeDelta& interval) override;
493 // AcceleratedWidgetMacNSView implementation.
494 NSView* AcceleratedWidgetGetNSView() const override;
495 bool AcceleratedWidgetShouldIgnoreBackpressure() const override;
496 void AcceleratedWidgetSwapCompleted(
497 const std::vector<ui::LatencyInfo>& latency_info) override;
498 void AcceleratedWidgetHitError() override;
500 // Transition from being in the Suspended state to being in the Destroyed
501 // state, if appropriate (see BrowserCompositorViewState for details).
502 void DestroySuspendedBrowserCompositorViewIfNeeded();
504 private:
505 friend class RenderWidgetHostViewMacTest;
507 // Returns whether this render view is a popup (autocomplete window).
508 bool IsPopup() const;
510 // Shuts down the render_widget_host_. This is a separate function so we can
511 // invoke it from the message loop.
512 void ShutdownHost();
514 // Tear down all components of the browser compositor in an order that will
515 // ensure no dangling references.
516 void ShutdownBrowserCompositor();
518 // The state of the the browser compositor and delegated frame host. See
519 // BrowserCompositorViewState for details.
520 void EnsureBrowserCompositorView();
521 void SuspendBrowserCompositorView();
522 void DestroyBrowserCompositorView();
524 // IPC message handlers.
525 void OnPluginFocusChanged(bool focused, int plugin_id);
526 void OnStartPluginIme();
527 void OnGetRenderedTextCompleted(const std::string& text);
529 // Send updated vsync parameters to the renderer.
530 void SendVSyncParametersToRenderer();
532 // Dispatches a TTS session.
533 void SpeakText(const std::string& text);
535 // The associated view. This is weak and is inserted into the view hierarchy
536 // to own this RenderWidgetHostViewMac object. Set to nil at the start of the
537 // destructor.
538 RenderWidgetHostViewCocoa* cocoa_view_;
540 // Indicates if the page is loading.
541 bool is_loading_;
543 // Whether it's allowed to pause waiting for a new frame.
544 bool allow_pause_for_resize_or_repaint_;
546 // The last scroll offset of the view.
547 gfx::Vector2dF last_scroll_offset_;
549 // The text to be shown in the tooltip, supplied by the renderer.
550 base::string16 tooltip_text_;
552 // True when this view acts as a platform view hack for a
553 // RenderWidgetHostViewGuest.
554 bool is_guest_view_hack_;
556 // selected text on the renderer.
557 std::string selected_text_;
559 // The window used for popup widgets.
560 base::scoped_nsobject<NSWindow> popup_window_;
562 // The fullscreen window used for pepper flash.
563 base::scoped_nsobject<NSWindow> pepper_fullscreen_window_;
564 base::scoped_nsobject<FullscreenWindowManager> fullscreen_window_manager_;
565 // Our parent host view, if this is fullscreen. NULL otherwise.
566 RenderWidgetHostViewMac* fullscreen_parent_host_view_;
568 // Display link for getting vsync info.
569 scoped_refptr<ui::DisplayLinkMac> display_link_;
571 // The current VSync timebase and interval. This is zero until the first call
572 // to SendVSyncParametersToRenderer(), and refreshed regularly thereafter.
573 base::TimeTicks vsync_timebase_;
574 base::TimeDelta vsync_interval_;
576 // The current composition character range and its bounds.
577 gfx::Range composition_range_;
578 std::vector<gfx::Rect> composition_bounds_;
580 // The current caret bounds.
581 gfx::Rect caret_rect_;
583 // Factory used to safely scope delayed calls to ShutdownHost().
584 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
586 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
589 } // namespace content
591 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_