6941f3242992d1357f291be45ac1824e06bdf999
[vuplus_webkit] / Source / WebKit / chromium / src / WebViewImpl.h
1 /*
2  * Copyright (C) 2010 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met:
7  *
8  *     * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *     * Redistributions in binary form must reproduce the above
11  * copyright notice, this list of conditions and the following disclaimer
12  * in the documentation and/or other materials provided with the
13  * distribution.
14  *     * Neither the name of Google Inc. nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30
31 #ifndef WebViewImpl_h
32 #define WebViewImpl_h
33
34 #include "WebNavigationPolicy.h"
35 #include "WebPoint.h"
36 #include "WebRect.h"
37 #include "WebSize.h"
38 #include "WebString.h"
39 #include "WebView.h"
40
41 #include "ChromeClientImpl.h"
42 #include "ContextMenuClientImpl.h"
43 #include "DragClientImpl.h"
44 #include "EditorClientImpl.h"
45 #include "GraphicsContext3D.h"
46 #include "GraphicsLayer.h"
47 #include "InspectorClientImpl.h"
48 #include "IntRect.h"
49 #include "NotificationPresenterImpl.h"
50 #include "PageOverlay.h"
51 #include "cc/CCLayerTreeHost.h"
52 #include <wtf/OwnPtr.h>
53 #include <wtf/RefCounted.h>
54
55 namespace WebCore {
56 class ChromiumDataObject;
57 class DocumentLoader;
58 class Frame;
59 class GraphicsContext3D;
60 class HistoryItem;
61 class HitTestResult;
62 class KeyboardEvent;
63 class NonCompositedContentHost;
64 class Page;
65 class PlatformKeyboardEvent;
66 class PopupContainer;
67 class PopupMenuClient;
68 class Range;
69 class RenderTheme;
70 class Widget;
71 #if ENABLE(GESTURE_RECOGNIZER)
72 class PlatformGestureRecognizer;
73 #endif
74 }
75
76 namespace WebKit {
77 class AutocompletePopupMenuClient;
78 class AutofillPopupMenuClient;
79 class ContextMenuClientImpl;
80 class DeviceOrientationClientProxy;
81 class DragScrollTimer;
82 class GeolocationClientProxy;
83 class SpeechInputClientImpl;
84 class WebAccessibilityObject;
85 class WebDevToolsAgentClient;
86 class WebDevToolsAgentPrivate;
87 class WebFrameImpl;
88 class WebGestureEvent;
89 class WebImage;
90 class WebKeyboardEvent;
91 class WebMouseEvent;
92 class WebMouseWheelEvent;
93 class WebSettingsImpl;
94 class WebTouchEvent;
95
96 class WebViewImpl : public WebView, public WebCore::CCLayerTreeHostClient, public RefCounted<WebViewImpl> {
97 public:
98     // WebWidget methods:
99     virtual void close();
100     virtual WebSize size() { return m_size; }
101     virtual void willStartLiveResize();
102     virtual void resize(const WebSize&);
103     virtual void willEndLiveResize();
104     virtual void animate(double frameBeginTime);
105     virtual void layout();
106     virtual void paint(WebCanvas*, const WebRect&);
107     virtual void themeChanged();
108     virtual void composite(bool finish);
109     virtual bool handleInputEvent(const WebInputEvent&);
110     virtual void mouseCaptureLost();
111     virtual void setFocus(bool enable);
112     virtual bool setComposition(
113         const WebString& text,
114         const WebVector<WebCompositionUnderline>& underlines,
115         int selectionStart,
116         int selectionEnd);
117     virtual bool confirmComposition();
118     virtual bool confirmComposition(const WebString& text);
119     virtual bool compositionRange(size_t* location, size_t* length);
120     virtual WebTextInputType textInputType();
121     virtual bool getSelectionOffsetsAndTextInEditableContent(WebString&, size_t& focus, size_t& anchor) const;
122     virtual WebRect caretOrSelectionBounds();
123     virtual bool selectionRange(WebPoint& start, WebPoint& end) const;
124     virtual bool caretOrSelectionRange(size_t* location, size_t* length);
125     virtual void setTextDirection(WebTextDirection direction);
126     virtual bool isAcceleratedCompositingActive() const;
127
128     // WebView methods:
129     virtual void initializeMainFrame(WebFrameClient*);
130     virtual void setAutofillClient(WebAutofillClient*);
131     virtual void setDevToolsAgentClient(WebDevToolsAgentClient*);
132     virtual void setPermissionClient(WebPermissionClient*);
133     virtual void setSpellCheckClient(WebSpellCheckClient*);
134     virtual WebSettings* settings();
135     virtual WebString pageEncoding() const;
136     virtual void setPageEncoding(const WebString& encoding);
137     virtual bool isTransparent() const;
138     virtual void setIsTransparent(bool value);
139     virtual bool tabsToLinks() const;
140     virtual void setTabsToLinks(bool value);
141     virtual bool tabKeyCyclesThroughElements() const;
142     virtual void setTabKeyCyclesThroughElements(bool value);
143     virtual bool isActive() const;
144     virtual void setIsActive(bool value);
145     virtual void setDomainRelaxationForbidden(bool, const WebString& scheme);
146     virtual bool dispatchBeforeUnloadEvent();
147     virtual void dispatchUnloadEvent();
148     virtual WebFrame* mainFrame();
149     virtual WebFrame* findFrameByName(
150         const WebString& name, WebFrame* relativeToFrame);
151     virtual WebFrame* focusedFrame();
152     virtual void setFocusedFrame(WebFrame* frame);
153     virtual void setInitialFocus(bool reverse);
154     virtual void clearFocusedNode();
155     virtual void scrollFocusedNodeIntoView();
156     virtual double zoomLevel();
157     virtual double setZoomLevel(bool textOnly, double zoomLevel);
158     virtual void zoomLimitsChanged(double minimumZoomLevel,
159                                    double maximumZoomLevel);
160     virtual float pageScaleFactor() const;
161     virtual void scalePage(float scaleFactor, WebPoint origin);
162     virtual bool isFixedLayoutModeEnabled() const;
163     virtual void enableFixedLayoutMode(bool enable);
164     virtual WebSize fixedLayoutSize() const;
165     virtual void setFixedLayoutSize(const WebSize&);
166     virtual void performMediaPlayerAction(
167         const WebMediaPlayerAction& action,
168         const WebPoint& location);
169     virtual void copyImageAt(const WebPoint& point);
170     virtual void dragSourceEndedAt(
171         const WebPoint& clientPoint,
172         const WebPoint& screenPoint,
173         WebDragOperation operation);
174     virtual void dragSourceMovedTo(
175         const WebPoint& clientPoint,
176         const WebPoint& screenPoint,
177         WebDragOperation operation);
178     virtual void dragSourceSystemDragEnded();
179     virtual WebDragOperation dragTargetDragEnter(
180         const WebDragData&,
181         const WebPoint& clientPoint,
182         const WebPoint& screenPoint,
183         WebDragOperationsMask operationsAllowed);
184     virtual WebDragOperation dragTargetDragOver(
185         const WebPoint& clientPoint,
186         const WebPoint& screenPoint,
187         WebDragOperationsMask operationsAllowed);
188     virtual void dragTargetDragLeave();
189     virtual void dragTargetDrop(
190         const WebPoint& clientPoint,
191         const WebPoint& screenPoint);
192     virtual unsigned long createUniqueIdentifierForRequest();
193     virtual void inspectElementAt(const WebPoint& point);
194     virtual WebString inspectorSettings() const;
195     virtual void setInspectorSettings(const WebString& settings);
196     virtual bool inspectorSetting(const WebString& key, WebString* value) const;
197     virtual void setInspectorSetting(const WebString& key,
198                                      const WebString& value);
199     virtual WebDevToolsAgent* devToolsAgent();
200     virtual WebAccessibilityObject accessibilityObject();
201     virtual void applyAutofillSuggestions(
202         const WebNode&,
203         const WebVector<WebString>& names,
204         const WebVector<WebString>& labels,
205         const WebVector<WebString>& icons,
206         const WebVector<int>& uniqueIDs,
207         int separatorIndex);
208     virtual void hidePopups();
209     virtual void setScrollbarColors(unsigned inactiveColor,
210                                     unsigned activeColor,
211                                     unsigned trackColor);
212     virtual void setSelectionColors(unsigned activeBackgroundColor,
213                                     unsigned activeForegroundColor,
214                                     unsigned inactiveBackgroundColor,
215                                     unsigned inactiveForegroundColor);
216     virtual void performCustomContextMenuAction(unsigned action);
217     virtual void exitFullscreen();
218
219     // CCLayerTreeHostClient
220     virtual void animateAndLayout(double frameBeginTime);
221     virtual PassOwnPtr<WebCore::CCThread> createCompositorThread();
222     virtual PassRefPtr<WebCore::GraphicsContext3D> createLayerTreeHostContext3D();
223     virtual PassOwnPtr<WebCore::LayerPainterChromium> createRootLayerPainter();
224     virtual void didRecreateGraphicsContext(bool success);
225 #if !USE(THREADED_COMPOSITING)
226     virtual void scheduleComposite();
227 #endif
228
229     // WebViewImpl
230
231     void setIgnoreInputEvents(bool newValue);
232     WebDevToolsAgentPrivate* devToolsAgentPrivate() { return m_devToolsAgent.get(); }
233
234     PageOverlay* pageOverlay() const { return m_pageOverlay.get(); }
235     void setPageOverlayClient(PageOverlay::PageOverlayClient*);
236
237     void setOverlayLayer(WebCore::GraphicsLayer*);
238
239     const WebPoint& lastMouseDownPoint() const
240     {
241         return m_lastMouseDownPoint;
242     }
243
244     WebCore::Frame* focusedWebCoreFrame() const;
245
246     // Returns the currently focused Node or null if no node has focus.
247     WebCore::Node* focusedWebCoreNode();
248
249     static WebViewImpl* fromPage(WebCore::Page*);
250
251     WebViewClient* client()
252     {
253         return m_client;
254     }
255
256     WebAutofillClient* autofillClient()
257     {
258         return m_autofillClient;
259     }
260
261     WebPermissionClient* permissionClient()
262     {
263         return m_permissionClient;
264     }
265
266     WebSpellCheckClient* spellCheckClient()
267     {
268         return m_spellCheckClient;
269     }
270
271     // Returns the page object associated with this view. This may be null when
272     // the page is shutting down, but will be valid at all other times.
273     WebCore::Page* page() const
274     {
275         return m_page.get();
276     }
277
278     WebCore::RenderTheme* theme() const;
279
280     // Returns the main frame associated with this view. This may be null when
281     // the page is shutting down, but will be valid at all other times.
282     WebFrameImpl* mainFrameImpl();
283
284     // History related methods:
285     void observeNewNavigation();
286
287     // Event related methods:
288     void mouseMove(const WebMouseEvent&);
289     void mouseLeave(const WebMouseEvent&);
290     void mouseDown(const WebMouseEvent&);
291     void mouseUp(const WebMouseEvent&);
292     void mouseContextMenu(const WebMouseEvent&);
293     void mouseDoubleClick(const WebMouseEvent&);
294     bool mouseWheel(const WebMouseWheelEvent&);
295     bool gestureEvent(const WebGestureEvent&);
296     bool keyEvent(const WebKeyboardEvent&);
297     bool charEvent(const WebKeyboardEvent&);
298     bool touchEvent(const WebTouchEvent&);
299
300     // Handles context menu events orignated via the the keyboard. These
301     // include the VK_APPS virtual key and the Shift+F10 combine. Code is
302     // based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM
303     // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only
304     // significant change in this function is the code to convert from a
305     // Keyboard event to the Right Mouse button down event.
306     bool sendContextMenuEvent(const WebKeyboardEvent&);
307
308     // Notifies the WebView that a load has been committed. isNewNavigation
309     // will be true if a new session history item should be created for that
310     // load.
311     void didCommitLoad(bool* isNewNavigation);
312
313     // Returns true if popup menus should be rendered by the browser, false if
314     // they should be rendered by WebKit (which is the default).
315     static bool useExternalPopupMenus();
316
317     bool contextMenuAllowed() const
318     {
319         return m_contextMenuAllowed;
320     }
321
322     // Set the disposition for how this webview is to be initially shown.
323     void setInitialNavigationPolicy(WebNavigationPolicy policy)
324     {
325         m_initialNavigationPolicy = policy;
326     }
327     WebNavigationPolicy initialNavigationPolicy() const
328     {
329         return m_initialNavigationPolicy;
330     }
331
332     // Determines whether a page should e.g. be opened in a background tab.
333     // Returns false if it has no opinion, in which case it doesn't set *policy.
334     static bool navigationPolicyFromMouseEvent(
335         unsigned short button,
336         bool ctrl,
337         bool shift,
338         bool alt,
339         bool meta,
340         WebNavigationPolicy*);
341
342     // Start a system drag and drop operation.
343     void startDragging(
344         const WebDragData& dragData,
345         WebDragOperationsMask mask,
346         const WebImage& dragImage,
347         const WebPoint& dragImageOffset);
348
349     void autofillPopupDidHide()
350     {
351         m_autofillPopupShowing = false;
352     }
353
354 #if ENABLE(NOTIFICATIONS)
355     // Returns the provider of desktop notifications.
356     NotificationPresenterImpl* notificationPresenterImpl();
357 #endif
358
359     // Tries to scroll a frame or any parent of a frame. Returns true if the view
360     // was scrolled.
361     bool propagateScroll(WebCore::ScrollDirection, WebCore::ScrollGranularity);
362
363     // Notification that a popup was opened/closed.
364     void popupOpened(WebCore::PopupContainer* popupContainer);
365     void popupClosed(WebCore::PopupContainer* popupContainer);
366
367     void hideAutofillPopup();
368
369     // Returns the input event we're currently processing. This is used in some
370     // cases where the WebCore DOM event doesn't have the information we need.
371     static const WebInputEvent* currentInputEvent()
372     {
373         return m_currentInputEvent;
374     }
375
376 #if USE(ACCELERATED_COMPOSITING)
377     bool allowsAcceleratedCompositing();
378     bool pageHasRTLStyle() const;
379     void setRootGraphicsLayer(WebCore::GraphicsLayer*);
380     void setRootLayerNeedsDisplay();
381     void scrollRootLayerRect(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& clipRect);
382     void invalidateRootLayerRect(const WebCore::IntRect&);
383     void doUpdateAndComposite();
384 #endif
385
386     // Returns the onscreen 3D context used by the compositor. This is
387     // used by the renderer's code to set up resource sharing between
388     // the compositor's context and subordinate contexts for APIs like
389     // WebGL. Returns 0 if compositing support is not compiled in.
390     virtual WebGraphicsContext3D* graphicsContext3D();
391
392     virtual void setVisibilityState(WebPageVisibilityState, bool);
393
394     WebCore::PopupContainer* selectPopup() const { return m_selectPopup.get(); }
395
396     // Returns true if the event leads to scrolling.
397     static bool mapKeyCodeForScroll(int keyCode,
398                                    WebCore::ScrollDirection* scrollDirection,
399                                    WebCore::ScrollGranularity* scrollGranularity);
400
401     // Called by a full frame plugin inside this view to inform it that its
402     // zoom level has been updated.  The plugin should only call this function
403     // if the zoom change was triggered by the browser, it's only needed in case
404     // a plugin can update its own zoom, say because of its own UI.
405     void fullFramePluginZoomLevelChanged(double zoomLevel);
406
407 #if ENABLE(GESTURE_RECOGNIZER)
408     void resetGestureRecognizer();
409 #endif
410
411     void loseCompositorContext(int numTimes);
412
413 private:
414     friend class WebView;  // So WebView::Create can call our constructor
415     friend class WTF::RefCounted<WebViewImpl>;
416
417     enum DragAction {
418       DragEnter,
419       DragOver
420     };
421
422     WebViewImpl(WebViewClient*);
423     virtual ~WebViewImpl();
424
425     // Returns true if the event was actually processed.
426     bool keyEventDefault(const WebKeyboardEvent&);
427
428     // Returns true if the autocomple has consumed the event.
429     bool autocompleteHandleKeyEvent(const WebKeyboardEvent&);
430
431     // Repaints the Autofill popup. Should be called when the suggestions
432     // have changed. Note that this should only be called when the Autofill
433     // popup is showing.
434     void refreshAutofillPopup();
435
436     // Returns true if the view was scrolled.
437     bool scrollViewWithKeyboard(int keyCode, int modifiers);
438
439     void hideSelectPopup();
440
441     // Converts |pos| from window coordinates to contents coordinates and gets
442     // the HitTestResult for it.
443     WebCore::HitTestResult hitTestResultForWindowPos(const WebCore::IntPoint&);
444
445     // Consolidate some common code between starting a drag over a target and
446     // updating a drag over a target. If we're starting a drag, |isEntering|
447     // should be true.
448     WebDragOperation dragTargetDragEnterOrOver(const WebPoint& clientPoint,
449                                                const WebPoint& screenPoint,
450                                                DragAction);
451
452 #if USE(ACCELERATED_COMPOSITING)
453     void setIsAcceleratedCompositingActive(bool);
454 #if !USE(THREADED_COMPOSITING)
455     void doComposite();
456 #endif
457     void doPixelReadbackToCanvas(WebCanvas*, const WebCore::IntRect&);
458     void reallocateRenderer();
459     void updateLayerTreeViewport();
460 #endif
461
462     WebViewClient* m_client;
463     WebAutofillClient* m_autofillClient;
464     WebPermissionClient* m_permissionClient;
465     WebSpellCheckClient* m_spellCheckClient;
466
467     ChromeClientImpl m_chromeClientImpl;
468     ContextMenuClientImpl m_contextMenuClientImpl;
469     DragClientImpl m_dragClientImpl;
470     EditorClientImpl m_editorClientImpl;
471     InspectorClientImpl m_inspectorClientImpl;
472
473     WebSize m_size;
474
475     WebPoint m_lastMousePosition;
476     OwnPtr<WebCore::Page> m_page;
477
478     // This flag is set when a new navigation is detected. It is used to satisfy
479     // the corresponding argument to WebFrameClient::didCommitProvisionalLoad.
480     bool m_observedNewNavigation;
481 #ifndef NDEBUG
482     // Used to assert that the new navigation we observed is the same navigation
483     // when we make use of m_observedNewNavigation.
484     const WebCore::DocumentLoader* m_newNavigationLoader;
485 #endif
486
487     // An object that can be used to manipulate m_page->settings() without linking
488     // against WebCore. This is lazily allocated the first time GetWebSettings()
489     // is called.
490     OwnPtr<WebSettingsImpl> m_webSettings;
491
492     // A copy of the web drop data object we received from the browser.
493     RefPtr<WebCore::ChromiumDataObject> m_currentDragData;
494
495     // The point relative to the client area where the mouse was last pressed
496     // down. This is used by the drag client to determine what was under the
497     // mouse when the drag was initiated. We need to track this here in
498     // WebViewImpl since DragClient::startDrag does not pass the position the
499     // mouse was at when the drag was initiated, only the current point, which
500     // can be misleading as it is usually not over the element the user actually
501     // dragged by the time a drag is initiated.
502     WebPoint m_lastMouseDownPoint;
503
504     // Keeps track of the current zoom level. 0 means no zoom, positive numbers
505     // mean zoom in, negative numbers mean zoom out.
506     double m_zoomLevel;
507
508     double m_minimumZoomLevel;
509
510     double m_maximumZoomLevel;
511
512     bool m_contextMenuAllowed;
513
514     bool m_doingDragAndDrop;
515
516     bool m_ignoreInputEvents;
517
518     // Webkit expects keyPress events to be suppressed if the associated keyDown
519     // event was handled. Safari implements this behavior by peeking out the
520     // associated WM_CHAR event if the keydown was handled. We emulate
521     // this behavior by setting this flag if the keyDown was handled.
522     bool m_suppressNextKeypressEvent;
523
524     // The policy for how this webview is to be initially shown.
525     WebNavigationPolicy m_initialNavigationPolicy;
526
527     // Represents whether or not this object should process incoming IME events.
528     bool m_imeAcceptEvents;
529
530     // The available drag operations (copy, move link...) allowed by the source.
531     WebDragOperation m_operationsAllowed;
532
533     // The current drag operation as negotiated by the source and destination.
534     // When not equal to DragOperationNone, the drag data can be dropped onto the
535     // current drop target in this WebView (the drop target can accept the drop).
536     WebDragOperation m_dragOperation;
537
538     // Whether an Autofill popup is currently showing.
539     bool m_autofillPopupShowing;
540
541     // The Autofill popup client.
542     OwnPtr<AutofillPopupMenuClient> m_autofillPopupClient;
543
544     // The Autofill popup.
545     RefPtr<WebCore::PopupContainer> m_autofillPopup;
546
547     // The popup associated with a select element.
548     RefPtr<WebCore::PopupContainer> m_selectPopup;
549
550     OwnPtr<WebDevToolsAgentPrivate> m_devToolsAgent;
551     OwnPtr<PageOverlay> m_pageOverlay;
552
553     // Whether the webview is rendering transparently.
554     bool m_isTransparent;
555
556     // Whether the user can press tab to focus links.
557     bool m_tabsToLinks;
558
559     // Inspector settings.
560     WebString m_inspectorSettings;
561
562     typedef HashMap<WTF::String, WTF::String> SettingsMap;
563     OwnPtr<SettingsMap> m_inspectorSettingsMap;
564     OwnPtr<DragScrollTimer> m_dragScrollTimer;
565
566 #if ENABLE(NOTIFICATIONS)
567     // The provider of desktop notifications;
568     NotificationPresenterImpl m_notificationPresenter;
569 #endif
570
571     // If set, the (plugin) node which has mouse capture.
572     RefPtr<WebCore::Node> m_mouseCaptureNode;
573
574 #if USE(ACCELERATED_COMPOSITING)
575     WebCore::IntRect m_rootLayerScrollDamage;
576     OwnPtr<WebCore::NonCompositedContentHost> m_nonCompositedContentHost;
577     RefPtr<WebCore::CCLayerTreeHost> m_layerTreeHost;
578     WebCore::GraphicsLayer* m_rootGraphicsLayer;
579     bool m_isAcceleratedCompositingActive;
580     bool m_compositorCreationFailed;
581     // If true, the graphics context is being restored.
582     bool m_recreatingGraphicsContext;
583 #endif
584     static const WebInputEvent* m_currentInputEvent;
585
586 #if ENABLE(INPUT_SPEECH)
587     OwnPtr<SpeechInputClientImpl> m_speechInputClient;
588 #endif
589     // If we attempt to fetch the on-screen GraphicsContext3D before
590     // the compositor has been turned on, we need to instantiate it
591     // early. This member holds on to the GC3D in this case.
592     RefPtr<WebCore::GraphicsContext3D> m_temporaryOnscreenGraphicsContext3D;
593     OwnPtr<DeviceOrientationClientProxy> m_deviceOrientationClientProxy;
594     OwnPtr<GeolocationClientProxy> m_geolocationClientProxy;
595
596 #if ENABLE(GESTURE_RECOGNIZER)
597     OwnPtr<WebCore::PlatformGestureRecognizer> m_gestureRecognizer;
598 #endif
599 };
600
601 } // namespace WebKit
602
603 #endif