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