WebKit/chromium/src/WebViewImpl.h
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     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 "WebGLES2Context.h"
       
    35 #include "WebNavigationPolicy.h"
       
    36 #include "WebPoint.h"
       
    37 #include "WebSize.h"
       
    38 #include "WebString.h"
       
    39 #include "WebView.h"
       
    40 
       
    41 #include "BackForwardListClientImpl.h"
       
    42 #include "ChromeClientImpl.h"
       
    43 #include "ContextMenuClientImpl.h"
       
    44 #include "DragClientImpl.h"
       
    45 #include "EditorClientImpl.h"
       
    46 #include "GraphicsLayer.h"
       
    47 #include "InspectorClientImpl.h"
       
    48 #include "LayerRendererChromium.h"
       
    49 #include "NotificationPresenterImpl.h"
       
    50 #include <wtf/OwnPtr.h>
       
    51 #include <wtf/RefCounted.h>
       
    52 
       
    53 namespace WebCore {
       
    54 class ChromiumDataObject;
       
    55 class Frame;
       
    56 class GLES2Context;
       
    57 class HistoryItem;
       
    58 class HitTestResult;
       
    59 class KeyboardEvent;
       
    60 class Page;
       
    61 class PlatformKeyboardEvent;
       
    62 class PopupContainer;
       
    63 class PopupMenuClient;
       
    64 class Range;
       
    65 class RenderTheme;
       
    66 class Widget;
       
    67 }
       
    68 
       
    69 namespace WebKit {
       
    70 class AutocompletePopupMenuClient;
       
    71 class AutoFillPopupMenuClient;
       
    72 class ContextMenuClientImpl;
       
    73 class DragScrollTimer;
       
    74 class WebAccessibilityObject;
       
    75 class WebDevToolsAgentClient;
       
    76 class WebDevToolsAgentPrivate;
       
    77 class WebFrameImpl;
       
    78 class WebImage;
       
    79 class WebKeyboardEvent;
       
    80 class WebMouseEvent;
       
    81 class WebMouseWheelEvent;
       
    82 class WebSettingsImpl;
       
    83 class WebTouchEvent;
       
    84 
       
    85 class WebViewImpl : public WebView, public RefCounted<WebViewImpl> {
       
    86 public:
       
    87     // WebWidget methods:
       
    88     virtual void close();
       
    89     virtual WebSize size() { return m_size; }
       
    90     virtual void resize(const WebSize&);
       
    91     virtual void layout();
       
    92     virtual void paint(WebCanvas*, const WebRect&);
       
    93     virtual bool handleInputEvent(const WebInputEvent&);
       
    94     virtual void mouseCaptureLost();
       
    95     virtual void setFocus(bool enable);
       
    96     virtual bool setComposition(
       
    97         const WebString& text,
       
    98         const WebVector<WebCompositionUnderline>& underlines,
       
    99         int selectionStart,
       
   100         int selectionEnd);
       
   101     virtual bool confirmComposition();
       
   102     virtual WebTextInputType textInputType();
       
   103     virtual WebRect caretOrSelectionBounds();
       
   104     virtual void setTextDirection(WebTextDirection direction);
       
   105     virtual bool isAcceleratedCompositingActive() const;
       
   106 
       
   107     // WebView methods:
       
   108     virtual void initializeMainFrame(WebFrameClient*);
       
   109     virtual WebSettings* settings();
       
   110     virtual WebString pageEncoding() const;
       
   111     virtual void setPageEncoding(const WebString& encoding);
       
   112     virtual bool isTransparent() const;
       
   113     virtual void setIsTransparent(bool value);
       
   114     virtual bool tabsToLinks() const;
       
   115     virtual void setTabsToLinks(bool value);
       
   116     virtual bool tabKeyCyclesThroughElements() const;
       
   117     virtual void setTabKeyCyclesThroughElements(bool value);
       
   118     virtual bool isActive() const;
       
   119     virtual void setIsActive(bool value);
       
   120     virtual bool dispatchBeforeUnloadEvent();
       
   121     virtual void dispatchUnloadEvent();
       
   122     virtual WebFrame* mainFrame();
       
   123     virtual WebFrame* findFrameByName(
       
   124         const WebString& name, WebFrame* relativeToFrame);
       
   125     virtual WebFrame* focusedFrame();
       
   126     virtual void setFocusedFrame(WebFrame* frame);
       
   127     virtual void setInitialFocus(bool reverse);
       
   128     virtual void clearFocusedNode();
       
   129     virtual int zoomLevel();
       
   130     virtual int setZoomLevel(bool textOnly, int zoomLevel);
       
   131     virtual void performMediaPlayerAction(
       
   132         const WebMediaPlayerAction& action,
       
   133         const WebPoint& location);
       
   134     virtual void copyImageAt(const WebPoint& point);
       
   135     virtual void dragSourceEndedAt(
       
   136         const WebPoint& clientPoint,
       
   137         const WebPoint& screenPoint,
       
   138         WebDragOperation operation);
       
   139     virtual void dragSourceMovedTo(
       
   140         const WebPoint& clientPoint,
       
   141         const WebPoint& screenPoint,
       
   142         WebDragOperation operation);
       
   143     virtual void dragSourceSystemDragEnded();
       
   144     virtual WebDragOperation dragTargetDragEnter(
       
   145         const WebDragData& dragData, int identity,
       
   146         const WebPoint& clientPoint,
       
   147         const WebPoint& screenPoint,
       
   148         WebDragOperationsMask operationsAllowed);
       
   149     virtual WebDragOperation dragTargetDragOver(
       
   150         const WebPoint& clientPoint,
       
   151         const WebPoint& screenPoint,
       
   152         WebDragOperationsMask operationsAllowed);
       
   153     virtual void dragTargetDragLeave();
       
   154     virtual void dragTargetDrop(
       
   155         const WebPoint& clientPoint,
       
   156         const WebPoint& screenPoint);
       
   157     virtual int dragIdentity();
       
   158     virtual bool setDropEffect(bool accept);
       
   159     virtual unsigned long createUniqueIdentifierForRequest();
       
   160     virtual void inspectElementAt(const WebPoint& point);
       
   161     virtual WebString inspectorSettings() const;
       
   162     virtual void setInspectorSettings(const WebString& settings);
       
   163     virtual bool inspectorSetting(const WebString& key, WebString* value) const;
       
   164     virtual void setInspectorSetting(const WebString& key,
       
   165                                      const WebString& value);
       
   166     virtual WebDevToolsAgent* devToolsAgent();
       
   167     virtual WebAccessibilityObject accessibilityObject();
       
   168     // DEPRECATED.
       
   169     virtual void applyAutoFillSuggestions(
       
   170         const WebNode&,
       
   171         const WebVector<WebString>& names,
       
   172         const WebVector<WebString>& labels,
       
   173         int separatorIndex);
       
   174     virtual void applyAutoFillSuggestions(
       
   175         const WebNode&,
       
   176         const WebVector<WebString>& names,
       
   177         const WebVector<WebString>& labels,
       
   178         const WebVector<int>& uniqueIDs,
       
   179         int separatorIndex);
       
   180     // DEPRECATED: replacing with applyAutoFillSuggestions.
       
   181     virtual void applyAutocompleteSuggestions(
       
   182         const WebNode&,
       
   183         const WebVector<WebString>& suggestions,
       
   184         int defaultSuggestionIndex);
       
   185     virtual void hidePopups();
       
   186     virtual void setScrollbarColors(unsigned inactiveColor,
       
   187                                     unsigned activeColor,
       
   188                                     unsigned trackColor);
       
   189     virtual void setSelectionColors(unsigned activeBackgroundColor,
       
   190                                     unsigned activeForegroundColor,
       
   191                                     unsigned inactiveBackgroundColor,
       
   192                                     unsigned inactiveForegroundColor);
       
   193     virtual void performCustomContextMenuAction(unsigned action);
       
   194 
       
   195     // WebViewImpl
       
   196 
       
   197     void setIgnoreInputEvents(bool newValue);
       
   198     WebDevToolsAgentPrivate* devToolsAgentPrivate() { return m_devToolsAgent.get(); }
       
   199 
       
   200     const WebPoint& lastMouseDownPoint() const
       
   201     {
       
   202         return m_lastMouseDownPoint;
       
   203     }
       
   204 
       
   205     WebCore::Frame* focusedWebCoreFrame();
       
   206 
       
   207     // Returns the currently focused Node or null if no node has focus.
       
   208     WebCore::Node* focusedWebCoreNode();
       
   209 
       
   210     static WebViewImpl* fromPage(WebCore::Page*);
       
   211 
       
   212     WebViewClient* client()
       
   213     {
       
   214         return m_client;
       
   215     }
       
   216 
       
   217     // Returns the page object associated with this view. This may be null when
       
   218     // the page is shutting down, but will be valid at all other times.
       
   219     WebCore::Page* page() const
       
   220     {
       
   221         return m_page.get();
       
   222     }
       
   223 
       
   224     WebCore::RenderTheme* theme() const;
       
   225 
       
   226     // Returns the main frame associated with this view. This may be null when
       
   227     // the page is shutting down, but will be valid at all other times.
       
   228     WebFrameImpl* mainFrameImpl();
       
   229 
       
   230     // History related methods:
       
   231     void setCurrentHistoryItem(WebCore::HistoryItem*);
       
   232     WebCore::HistoryItem* previousHistoryItem();
       
   233     void observeNewNavigation();
       
   234 
       
   235     // Event related methods:
       
   236     void mouseMove(const WebMouseEvent&);
       
   237     void mouseLeave(const WebMouseEvent&);
       
   238     void mouseDown(const WebMouseEvent&);
       
   239     void mouseUp(const WebMouseEvent&);
       
   240     void mouseContextMenu(const WebMouseEvent&);
       
   241     void mouseDoubleClick(const WebMouseEvent&);
       
   242     void mouseWheel(const WebMouseWheelEvent&);
       
   243     bool keyEvent(const WebKeyboardEvent&);
       
   244     bool charEvent(const WebKeyboardEvent&);
       
   245     bool touchEvent(const WebTouchEvent&);
       
   246 
       
   247     // Handles context menu events orignated via the the keyboard. These
       
   248     // include the VK_APPS virtual key and the Shift+F10 combine. Code is
       
   249     // based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM
       
   250     // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only
       
   251     // significant change in this function is the code to convert from a
       
   252     // Keyboard event to the Right Mouse button down event.
       
   253     bool sendContextMenuEvent(const WebKeyboardEvent&);
       
   254 
       
   255     // Notifies the WebView that a load has been committed. isNewNavigation
       
   256     // will be true if a new session history item should be created for that
       
   257     // load.
       
   258     void didCommitLoad(bool* isNewNavigation);
       
   259 
       
   260     bool contextMenuAllowed() const
       
   261     {
       
   262         return m_contextMenuAllowed;
       
   263     }
       
   264 
       
   265     // Set the disposition for how this webview is to be initially shown.
       
   266     void setInitialNavigationPolicy(WebNavigationPolicy policy)
       
   267     {
       
   268         m_initialNavigationPolicy = policy;
       
   269     }
       
   270     WebNavigationPolicy initialNavigationPolicy() const
       
   271     {
       
   272         return m_initialNavigationPolicy;
       
   273     }
       
   274 
       
   275     // Determines whether a page should e.g. be opened in a background tab.
       
   276     // Returns false if it has no opinion, in which case it doesn't set *policy.
       
   277     static bool navigationPolicyFromMouseEvent(
       
   278         unsigned short button,
       
   279         bool ctrl,
       
   280         bool shift,
       
   281         bool alt,
       
   282         bool meta,
       
   283         WebNavigationPolicy*);
       
   284 
       
   285     // Start a system drag and drop operation.
       
   286     void startDragging(
       
   287         const WebDragData& dragData,
       
   288         WebDragOperationsMask mask,
       
   289         const WebImage& dragImage,
       
   290         const WebPoint& dragImageOffset);
       
   291 
       
   292     void autoFillPopupDidHide()
       
   293     {
       
   294         m_autoFillPopupShowing = false;
       
   295     }
       
   296 
       
   297 #if ENABLE(NOTIFICATIONS)
       
   298     // Returns the provider of desktop notifications.
       
   299     NotificationPresenterImpl* notificationPresenterImpl();
       
   300 #endif
       
   301 
       
   302     // Tries to scroll a frame or any parent of a frame. Returns true if the view
       
   303     // was scrolled.
       
   304     bool propagateScroll(WebCore::ScrollDirection, WebCore::ScrollGranularity);
       
   305 
       
   306     // Notification that a popup was opened/closed.
       
   307     void popupOpened(WebCore::PopupContainer* popupContainer);
       
   308     void popupClosed(WebCore::PopupContainer* popupContainer);
       
   309 
       
   310     void hideAutoFillPopup();
       
   311 
       
   312     // HACK: currentInputEvent() is for ChromeClientImpl::show(), until we can
       
   313     // fix WebKit to pass enough information up into ChromeClient::show() so we
       
   314     // can decide if the window.open event was caused by a middle-mouse click
       
   315     static const WebInputEvent* currentInputEvent()
       
   316     {
       
   317         return m_currentInputEvent;
       
   318     }
       
   319 
       
   320 #if USE(ACCELERATED_COMPOSITING)
       
   321     void setRootLayerNeedsDisplay();
       
   322     void setRootGraphicsLayer(WebCore::PlatformLayer*);
       
   323 #endif
       
   324     // Onscreen contexts display to the screen associated with this view.
       
   325     // Offscreen contexts render offscreen but can share resources with the
       
   326     // onscreen context and thus can be composited.
       
   327     PassOwnPtr<WebCore::GLES2Context> getOnscreenGLES2Context();
       
   328     PassOwnPtr<WebCore::GLES2Context> getOffscreenGLES2Context();
       
   329 
       
   330     // Returns an onscreen context
       
   331     virtual WebGLES2Context* gles2Context();
       
   332 
       
   333     WebCore::PopupContainer* selectPopup() const { return m_selectPopup.get(); }
       
   334 
       
   335     // Returns true if the event leads to scrolling.
       
   336     static bool mapKeyCodeForScroll(int keyCode,
       
   337                                    WebCore::ScrollDirection* scrollDirection,
       
   338                                    WebCore::ScrollGranularity* scrollGranularity);
       
   339 
       
   340 private:
       
   341     friend class WebView;  // So WebView::Create can call our constructor
       
   342     friend class WTF::RefCounted<WebViewImpl>;
       
   343 
       
   344     enum DragAction {
       
   345       DragEnter,
       
   346       DragOver
       
   347     };
       
   348 
       
   349     WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devToolsClient);
       
   350     ~WebViewImpl();
       
   351 
       
   352     // Returns true if the event was actually processed.
       
   353     bool keyEventDefault(const WebKeyboardEvent&);
       
   354 
       
   355     // Returns true if the select popup has consumed the event.
       
   356     bool selectPopupHandleKeyEvent(const WebKeyboardEvent&);
       
   357 
       
   358     // Returns true if the autocomple has consumed the event.
       
   359     bool autocompleteHandleKeyEvent(const WebKeyboardEvent&);
       
   360 
       
   361     // Repaints the AutoFill popup. Should be called when the suggestions
       
   362     // have changed. Note that this should only be called when the AutoFill
       
   363     // popup is showing.
       
   364     void refreshAutoFillPopup();
       
   365 
       
   366     // Returns true if the view was scrolled.
       
   367     bool scrollViewWithKeyboard(int keyCode, int modifiers);
       
   368 
       
   369     void hideSelectPopup();
       
   370 
       
   371     // Converts |pos| from window coordinates to contents coordinates and gets
       
   372     // the HitTestResult for it.
       
   373     WebCore::HitTestResult hitTestResultForWindowPos(const WebCore::IntPoint&);
       
   374 
       
   375     // Consolidate some common code between starting a drag over a target and
       
   376     // updating a drag over a target. If we're starting a drag, |isEntering|
       
   377     // should be true.
       
   378     WebDragOperation dragTargetDragEnterOrOver(const WebPoint& clientPoint,
       
   379                                                const WebPoint& screenPoint,
       
   380                                                DragAction);
       
   381 
       
   382 #if USE(ACCELERATED_COMPOSITING)
       
   383     void setIsAcceleratedCompositingActive(bool);
       
   384     void updateRootLayerContents(const WebRect&);
       
   385 #endif
       
   386 
       
   387     WebViewClient* m_client;
       
   388 
       
   389     BackForwardListClientImpl m_backForwardListClientImpl;
       
   390     ChromeClientImpl m_chromeClientImpl;
       
   391     ContextMenuClientImpl m_contextMenuClientImpl;
       
   392     DragClientImpl m_dragClientImpl;
       
   393     EditorClientImpl m_editorClientImpl;
       
   394     InspectorClientImpl m_inspectorClientImpl;
       
   395 
       
   396     WebSize m_size;
       
   397 
       
   398     WebPoint m_lastMousePosition;
       
   399     OwnPtr<WebCore::Page> m_page;
       
   400 
       
   401     // This flag is set when a new navigation is detected. It is used to satisfy
       
   402     // the corresponding argument to WebFrameClient::didCommitProvisionalLoad.
       
   403     bool m_observedNewNavigation;
       
   404 #ifndef NDEBUG
       
   405     // Used to assert that the new navigation we observed is the same navigation
       
   406     // when we make use of m_observedNewNavigation.
       
   407     const WebCore::DocumentLoader* m_newNavigationLoader;
       
   408 #endif
       
   409 
       
   410     // An object that can be used to manipulate m_page->settings() without linking
       
   411     // against WebCore. This is lazily allocated the first time GetWebSettings()
       
   412     // is called.
       
   413     OwnPtr<WebSettingsImpl> m_webSettings;
       
   414 
       
   415     // A copy of the web drop data object we received from the browser.
       
   416     RefPtr<WebCore::ChromiumDataObject> m_currentDragData;
       
   417 
       
   418     // The point relative to the client area where the mouse was last pressed
       
   419     // down. This is used by the drag client to determine what was under the
       
   420     // mouse when the drag was initiated. We need to track this here in
       
   421     // WebViewImpl since DragClient::startDrag does not pass the position the
       
   422     // mouse was at when the drag was initiated, only the current point, which
       
   423     // can be misleading as it is usually not over the element the user actually
       
   424     // dragged by the time a drag is initiated.
       
   425     WebPoint m_lastMouseDownPoint;
       
   426 
       
   427     // Keeps track of the current zoom level. 0 means no zoom, positive numbers
       
   428     // mean zoom in, negative numbers mean zoom out.
       
   429     int m_zoomLevel;
       
   430 
       
   431     bool m_contextMenuAllowed;
       
   432 
       
   433     bool m_doingDragAndDrop;
       
   434 
       
   435     bool m_ignoreInputEvents;
       
   436 
       
   437     // Webkit expects keyPress events to be suppressed if the associated keyDown
       
   438     // event was handled. Safari implements this behavior by peeking out the
       
   439     // associated WM_CHAR event if the keydown was handled. We emulate
       
   440     // this behavior by setting this flag if the keyDown was handled.
       
   441     bool m_suppressNextKeypressEvent;
       
   442 
       
   443     // The policy for how this webview is to be initially shown.
       
   444     WebNavigationPolicy m_initialNavigationPolicy;
       
   445 
       
   446     // Represents whether or not this object should process incoming IME events.
       
   447     bool m_imeAcceptEvents;
       
   448 
       
   449     // True while dispatching system drag and drop events to drag/drop targets
       
   450     // within this WebView.
       
   451     bool m_dragTargetDispatch;
       
   452 
       
   453     // Valid when m_dragTargetDispatch is true; the identity of the drag data
       
   454     // copied from the WebDropData object sent from the browser process.
       
   455     int m_dragIdentity;
       
   456 
       
   457     // Valid when m_dragTargetDispatch is true. Used to override the default
       
   458     // browser drop effect with the effects "none" or "copy".
       
   459     enum DragTargetDropEffect {
       
   460         DropEffectDefault = -1,
       
   461         DropEffectNone,
       
   462         DropEffectCopy
       
   463     } m_dropEffect;
       
   464 
       
   465     // The available drag operations (copy, move link...) allowed by the source.
       
   466     WebDragOperation m_operationsAllowed;
       
   467 
       
   468     // The current drag operation as negotiated by the source and destination.
       
   469     // When not equal to DragOperationNone, the drag data can be dropped onto the
       
   470     // current drop target in this WebView (the drop target can accept the drop).
       
   471     WebDragOperation m_dragOperation;
       
   472 
       
   473     // Whether an AutoFill popup is currently showing.
       
   474     bool m_autoFillPopupShowing;
       
   475 
       
   476     // The AutoFill popup client.
       
   477     OwnPtr<AutoFillPopupMenuClient> m_autoFillPopupClient;
       
   478 
       
   479     // The AutoFill popup.
       
   480     RefPtr<WebCore::PopupContainer> m_autoFillPopup;
       
   481 
       
   482     // The popup associated with a select element.
       
   483     RefPtr<WebCore::PopupContainer> m_selectPopup;
       
   484 
       
   485     OwnPtr<WebDevToolsAgentPrivate> m_devToolsAgent;
       
   486 
       
   487     // Whether the webview is rendering transparently.
       
   488     bool m_isTransparent;
       
   489 
       
   490     // Whether the user can press tab to focus links.
       
   491     bool m_tabsToLinks;
       
   492 
       
   493     // Inspector settings.
       
   494     WebString m_inspectorSettings;
       
   495 
       
   496     typedef HashMap<WebCore::String, WebCore::String> SettingsMap;
       
   497     OwnPtr<SettingsMap> m_inspectorSettingsMap;
       
   498     OwnPtr<DragScrollTimer> m_dragScrollTimer;
       
   499 
       
   500 #if ENABLE(NOTIFICATIONS)
       
   501     // The provider of desktop notifications;
       
   502     NotificationPresenterImpl m_notificationPresenter;
       
   503 #endif
       
   504 
       
   505     // If set, the (plugin) node which has mouse capture.
       
   506     RefPtr<WebCore::Node> m_mouseCaptureNode;
       
   507 
       
   508 #if USE(ACCELERATED_COMPOSITING)
       
   509     OwnPtr<WebCore::LayerRendererChromium> m_layerRenderer;
       
   510     bool m_isAcceleratedCompositingActive;
       
   511 #endif
       
   512     static const WebInputEvent* m_currentInputEvent;
       
   513 
       
   514     OwnPtr<WebGLES2Context> m_gles2Context;
       
   515 };
       
   516 
       
   517 } // namespace WebKit
       
   518 
       
   519 #endif