Home | History | Annotate | Download | only in win
      1 /*
      2  * Copyright (C) 2006, 2007 Apple 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
      6  * are met:
      7  * 1. Redistributions of source code must retain the above copyright
      8  *    notice, this list of conditions and the following disclaimer.
      9  * 2. Redistributions in binary form must reproduce the above copyright
     10  *    notice, this list of conditions and the following disclaimer in the
     11  *    documentation and/or other materials provided with the distribution.
     12  *
     13  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     14  * EXPRESS OR IMPLIED WARRANTIES, INCfLUDING, BUT NOT LIMITED TO, THE
     15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
     21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     24  */
     25 
     26 #ifndef WebView_H
     27 #define WebView_H
     28 
     29 #include "WebKit.h"
     30 #include "WebFrame.h"
     31 #include "WebPreferences.h"
     32 #include <WebCore/COMPtr.h>
     33 #include <WebCore/DragActions.h>
     34 #include <WebCore/IntRect.h>
     35 #include <WebCore/RefCountedGDIHandle.h>
     36 #include <WebCore/SuspendableTimer.h>
     37 #include <WebCore/WindowMessageListener.h>
     38 #include <wtf/HashSet.h>
     39 #include <wtf/OwnPtr.h>
     40 #include <wtf/RefPtr.h>
     41 
     42 #if USE(ACCELERATED_COMPOSITING)
     43 #include <WebCore/CACFLayerTreeHostClient.h>
     44 #include <WebCore/GraphicsLayerClient.h>
     45 
     46 namespace WebCore {
     47     class CACFLayerTreeHost;
     48 }
     49 #endif
     50 
     51 namespace WebCore {
     52     class HistoryItem;
     53 }
     54 
     55 class FullscreenVideoController;
     56 class WebBackForwardList;
     57 class WebFrame;
     58 class WebInspector;
     59 class WebInspectorClient;
     60 
     61 typedef WebCore::RefCountedGDIHandle<HBITMAP> RefCountedHBITMAP;
     62 typedef WebCore::RefCountedGDIHandle<HRGN> RefCountedHRGN;
     63 
     64 WebView* kit(WebCore::Page*);
     65 WebCore::Page* core(IWebView*);
     66 
     67 interface IDropTargetHelper;
     68 
     69 class WebView
     70     : public IWebView
     71     , public IWebViewPrivate
     72     , public IWebIBActions
     73     , public IWebViewCSS
     74     , public IWebViewEditing
     75     , public IWebViewUndoableEditing
     76     , public IWebViewEditingActions
     77     , public IWebNotificationObserver
     78     , public IDropTarget
     79     , WebCore::WindowMessageListener
     80 #if USE(ACCELERATED_COMPOSITING)
     81     , WebCore::GraphicsLayerClient
     82     , WebCore::CACFLayerTreeHostClient
     83 #endif
     84 {
     85 public:
     86     static WebView* createInstance();
     87 protected:
     88     WebView();
     89     ~WebView();
     90 
     91 public:
     92     // IUnknown
     93     virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
     94     virtual ULONG STDMETHODCALLTYPE AddRef(void);
     95     virtual ULONG STDMETHODCALLTYPE Release(void);
     96 
     97     // IWebView
     98 
     99     virtual HRESULT STDMETHODCALLTYPE canShowMIMEType(
    100         /* [in] */ BSTR mimeType,
    101         /* [retval][out] */ BOOL *canShow);
    102 
    103     virtual HRESULT STDMETHODCALLTYPE canShowMIMETypeAsHTML(
    104         /* [in] */ BSTR mimeType,
    105         /* [retval][out] */ BOOL *canShow);
    106 
    107     virtual HRESULT STDMETHODCALLTYPE MIMETypesShownAsHTML(
    108         /* [retval][out] */ IEnumVARIANT **enumVariant);
    109 
    110     virtual HRESULT STDMETHODCALLTYPE setMIMETypesShownAsHTML(
    111         /* [size_is][in] */ BSTR *mimeTypes,
    112         /* [in] */ int cMimeTypes);
    113 
    114     virtual HRESULT STDMETHODCALLTYPE URLFromPasteboard(
    115         /* [in] */ IDataObject *pasteboard,
    116         /* [retval][out] */ BSTR *url);
    117 
    118     virtual HRESULT STDMETHODCALLTYPE URLTitleFromPasteboard(
    119         /* [in] */ IDataObject *pasteboard,
    120         /* [retval][out] */ BSTR *urlTitle);
    121 
    122     virtual HRESULT STDMETHODCALLTYPE initWithFrame(
    123         /* [in] */ RECT frame,
    124         /* [in] */ BSTR frameName,
    125         /* [in] */ BSTR groupName);
    126 
    127     virtual HRESULT STDMETHODCALLTYPE setUIDelegate(
    128         /* [in] */ IWebUIDelegate *d);
    129 
    130     virtual HRESULT STDMETHODCALLTYPE uiDelegate(
    131         /* [out][retval] */ IWebUIDelegate **d);
    132 
    133     virtual HRESULT STDMETHODCALLTYPE setResourceLoadDelegate(
    134         /* [in] */ IWebResourceLoadDelegate *d);
    135 
    136     virtual HRESULT STDMETHODCALLTYPE resourceLoadDelegate(
    137         /* [out][retval] */ IWebResourceLoadDelegate **d);
    138 
    139     virtual HRESULT STDMETHODCALLTYPE setDownloadDelegate(
    140         /* [in] */ IWebDownloadDelegate *d);
    141 
    142     virtual HRESULT STDMETHODCALLTYPE downloadDelegate(
    143         /* [out][retval] */ IWebDownloadDelegate **d);
    144 
    145     virtual HRESULT STDMETHODCALLTYPE setFrameLoadDelegate(
    146         /* [in] */ IWebFrameLoadDelegate *d);
    147 
    148     virtual HRESULT STDMETHODCALLTYPE frameLoadDelegate(
    149         /* [out][retval] */ IWebFrameLoadDelegate **d);
    150 
    151     virtual HRESULT STDMETHODCALLTYPE setPolicyDelegate(
    152         /* [in] */ IWebPolicyDelegate *d);
    153 
    154     virtual HRESULT STDMETHODCALLTYPE policyDelegate(
    155         /* [out][retval] */ IWebPolicyDelegate **d);
    156 
    157     virtual HRESULT STDMETHODCALLTYPE mainFrame(
    158         /* [out][retval] */ IWebFrame **frame);
    159 
    160     virtual HRESULT STDMETHODCALLTYPE focusedFrame(
    161         /* [out][retval] */ IWebFrame **frame);
    162 
    163     virtual HRESULT STDMETHODCALLTYPE backForwardList(
    164         /* [out][retval] */ IWebBackForwardList **list);
    165 
    166     virtual HRESULT STDMETHODCALLTYPE setMaintainsBackForwardList(
    167         /* [in] */ BOOL flag);
    168 
    169     virtual HRESULT STDMETHODCALLTYPE goBack(
    170         /* [retval][out] */ BOOL *succeeded);
    171 
    172     virtual HRESULT STDMETHODCALLTYPE goForward(
    173         /* [retval][out] */ BOOL *succeeded);
    174 
    175     virtual HRESULT STDMETHODCALLTYPE goToBackForwardItem(
    176         /* [in] */ IWebHistoryItem *item,
    177         /* [retval][out] */ BOOL *succeeded);
    178 
    179     virtual HRESULT STDMETHODCALLTYPE setTextSizeMultiplier(
    180         /* [in] */ float multiplier);
    181 
    182     virtual HRESULT STDMETHODCALLTYPE textSizeMultiplier(
    183         /* [retval][out] */ float *multiplier);
    184 
    185     virtual HRESULT STDMETHODCALLTYPE setApplicationNameForUserAgent(
    186         /* [in] */ BSTR applicationName);
    187 
    188     virtual HRESULT STDMETHODCALLTYPE applicationNameForUserAgent(
    189         /* [retval][out] */ BSTR *applicationName);
    190 
    191     virtual HRESULT STDMETHODCALLTYPE setCustomUserAgent(
    192         /* [in] */ BSTR userAgentString);
    193 
    194     virtual HRESULT STDMETHODCALLTYPE customUserAgent(
    195         /* [retval][out] */ BSTR *userAgentString);
    196 
    197     virtual HRESULT STDMETHODCALLTYPE userAgentForURL(
    198         /* [in] */ BSTR url,
    199         /* [retval][out] */ BSTR *userAgent);
    200 
    201     virtual HRESULT STDMETHODCALLTYPE supportsTextEncoding(
    202         /* [retval][out] */ BOOL *supports);
    203 
    204     virtual HRESULT STDMETHODCALLTYPE setCustomTextEncodingName(
    205         /* [in] */ BSTR encodingName);
    206 
    207     virtual HRESULT STDMETHODCALLTYPE customTextEncodingName(
    208         /* [retval][out] */ BSTR *encodingName);
    209 
    210     virtual HRESULT STDMETHODCALLTYPE setMediaStyle(
    211         /* [in] */ BSTR media);
    212 
    213     virtual HRESULT STDMETHODCALLTYPE mediaStyle(
    214         /* [retval][out] */ BSTR *media);
    215 
    216     virtual HRESULT STDMETHODCALLTYPE stringByEvaluatingJavaScriptFromString(
    217         /* [in] */ BSTR script,
    218         /* [retval][out] */ BSTR *result);
    219 
    220     virtual HRESULT STDMETHODCALLTYPE windowScriptObject(
    221         /* [retval][out] */ IWebScriptObject **webScriptObject);
    222 
    223     virtual HRESULT STDMETHODCALLTYPE setPreferences(
    224         /* [in] */ IWebPreferences *prefs);
    225 
    226     virtual HRESULT STDMETHODCALLTYPE preferences(
    227         /* [retval][out] */ IWebPreferences **prefs);
    228 
    229     virtual HRESULT STDMETHODCALLTYPE setPreferencesIdentifier(
    230         /* [in] */ BSTR anIdentifier);
    231 
    232     virtual HRESULT STDMETHODCALLTYPE preferencesIdentifier(
    233         /* [retval][out] */ BSTR *anIdentifier);
    234 
    235     virtual HRESULT STDMETHODCALLTYPE setHostWindow(
    236         /* [in] */ OLE_HANDLE window);
    237 
    238     virtual HRESULT STDMETHODCALLTYPE hostWindow(
    239         /* [retval][out] */ OLE_HANDLE *window);
    240 
    241     virtual HRESULT STDMETHODCALLTYPE searchFor(
    242         /* [in] */ BSTR str,
    243         /* [in] */ BOOL forward,
    244         /* [in] */ BOOL caseFlag,
    245         /* [in] */ BOOL wrapFlag,
    246         /* [retval][out] */ BOOL *found);
    247 
    248     virtual HRESULT STDMETHODCALLTYPE registerViewClass(
    249         /* [in] */ IWebDocumentView *view,
    250         /* [in] */ IWebDocumentRepresentation *representation,
    251         /* [in] */ BSTR forMIMEType);
    252 
    253     virtual HRESULT STDMETHODCALLTYPE setGroupName(
    254         /* [in] */ BSTR groupName);
    255 
    256     virtual HRESULT STDMETHODCALLTYPE groupName(
    257         /* [retval][out] */ BSTR *groupName);
    258 
    259     virtual HRESULT STDMETHODCALLTYPE estimatedProgress(
    260         /* [retval][out] */ double *estimatedProgress);
    261 
    262     virtual HRESULT STDMETHODCALLTYPE isLoading(
    263         /* [retval][out] */ BOOL *isLoading);
    264 
    265     virtual HRESULT STDMETHODCALLTYPE elementAtPoint(
    266         /* [in] */ LPPOINT point,
    267         /* [retval][out] */ IPropertyBag **elementDictionary);
    268 
    269     virtual HRESULT STDMETHODCALLTYPE pasteboardTypesForSelection(
    270         /* [retval][out] */ IEnumVARIANT **enumVariant);
    271 
    272     virtual HRESULT STDMETHODCALLTYPE writeSelectionWithPasteboardTypes(
    273         /* [size_is][in] */ BSTR *types,
    274         /* [in] */ int cTypes,
    275         /* [in] */ IDataObject *pasteboard);
    276 
    277     virtual HRESULT STDMETHODCALLTYPE pasteboardTypesForElement(
    278         /* [in] */ IPropertyBag *elementDictionary,
    279         /* [retval][out] */ IEnumVARIANT **enumVariant);
    280 
    281     virtual HRESULT STDMETHODCALLTYPE writeElement(
    282         /* [in] */ IPropertyBag *elementDictionary,
    283         /* [size_is][in] */ BSTR *withPasteboardTypes,
    284         /* [in] */ int cWithPasteboardTypes,
    285         /* [in] */ IDataObject *pasteboard);
    286 
    287     virtual HRESULT STDMETHODCALLTYPE selectedText(
    288         /* [out, retval] */ BSTR* str);
    289 
    290     virtual HRESULT STDMETHODCALLTYPE centerSelectionInVisibleArea(
    291         /* [in] */ IUnknown* sender);
    292 
    293     virtual HRESULT STDMETHODCALLTYPE moveDragCaretToPoint(
    294         /* [in] */ LPPOINT point);
    295 
    296     virtual HRESULT STDMETHODCALLTYPE removeDragCaret( void);
    297 
    298     virtual HRESULT STDMETHODCALLTYPE setDrawsBackground(
    299         /* [in] */ BOOL drawsBackground);
    300 
    301     virtual HRESULT STDMETHODCALLTYPE drawsBackground(
    302         /* [retval][out] */ BOOL *drawsBackground);
    303 
    304     virtual HRESULT STDMETHODCALLTYPE setMainFrameURL(
    305         /* [in] */ BSTR urlString);
    306 
    307     virtual HRESULT STDMETHODCALLTYPE mainFrameURL(
    308         /* [retval][out] */ BSTR *urlString);
    309 
    310     virtual HRESULT STDMETHODCALLTYPE mainFrameDocument(
    311         /* [retval][out] */ IDOMDocument **document);
    312 
    313     virtual HRESULT STDMETHODCALLTYPE mainFrameTitle(
    314         /* [retval][out] */ BSTR *title);
    315 
    316     virtual HRESULT STDMETHODCALLTYPE mainFrameIcon(
    317         /* [retval][out] */ OLE_HANDLE *hBitmap);
    318 
    319     virtual HRESULT STDMETHODCALLTYPE registerURLSchemeAsLocal(
    320         /* [in] */ BSTR scheme);
    321 
    322     virtual HRESULT STDMETHODCALLTYPE close();
    323 
    324     // IWebIBActions
    325 
    326     virtual HRESULT STDMETHODCALLTYPE takeStringURLFrom(
    327         /* [in] */ IUnknown *sender);
    328 
    329     virtual HRESULT STDMETHODCALLTYPE stopLoading(
    330         /* [in] */ IUnknown *sender);
    331 
    332     virtual HRESULT STDMETHODCALLTYPE reload(
    333         /* [in] */ IUnknown *sender);
    334 
    335     virtual HRESULT STDMETHODCALLTYPE canGoBack(
    336         /* [in] */ IUnknown *sender,
    337         /* [retval][out] */ BOOL *result);
    338 
    339     virtual HRESULT STDMETHODCALLTYPE goBack(
    340         /* [in] */ IUnknown *sender);
    341 
    342     virtual HRESULT STDMETHODCALLTYPE canGoForward(
    343         /* [in] */ IUnknown *sender,
    344         /* [retval][out] */ BOOL *result);
    345 
    346     virtual HRESULT STDMETHODCALLTYPE goForward(
    347         /* [in] */ IUnknown *sender);
    348 
    349     virtual HRESULT STDMETHODCALLTYPE canMakeTextLarger(
    350         /* [in] */ IUnknown *sender,
    351         /* [retval][out] */ BOOL *result);
    352 
    353     virtual HRESULT STDMETHODCALLTYPE makeTextLarger(
    354         /* [in] */ IUnknown *sender);
    355 
    356     virtual HRESULT STDMETHODCALLTYPE canMakeTextSmaller(
    357         /* [in] */ IUnknown *sender,
    358         /* [retval][out] */ BOOL *result);
    359 
    360     virtual HRESULT STDMETHODCALLTYPE makeTextSmaller(
    361         /* [in] */ IUnknown *sender);
    362 
    363     virtual HRESULT STDMETHODCALLTYPE canMakeTextStandardSize(
    364         /* [in] */ IUnknown *sender,
    365         /* [retval][out] */ BOOL *result);
    366 
    367     virtual HRESULT STDMETHODCALLTYPE makeTextStandardSize(
    368         /* [in] */ IUnknown *sender);
    369 
    370     virtual HRESULT STDMETHODCALLTYPE toggleContinuousSpellChecking(
    371         /* [in] */ IUnknown *sender);
    372 
    373     virtual HRESULT STDMETHODCALLTYPE toggleSmartInsertDelete(
    374         /* [in] */ IUnknown *sender);
    375 
    376     virtual HRESULT STDMETHODCALLTYPE toggleGrammarChecking(
    377         /* [in] */ IUnknown *sender);
    378 
    379     virtual HRESULT STDMETHODCALLTYPE reloadFromOrigin(
    380         /* [in] */ IUnknown *sender);
    381 
    382     // IWebViewCSS
    383 
    384     virtual HRESULT STDMETHODCALLTYPE computedStyleForElement(
    385         /* [in] */ IDOMElement *element,
    386         /* [in] */ BSTR pseudoElement,
    387         /* [retval][out] */ IDOMCSSStyleDeclaration **style);
    388 
    389     // IWebViewEditing
    390 
    391     virtual HRESULT STDMETHODCALLTYPE editableDOMRangeForPoint(
    392         /* [in] */ LPPOINT point,
    393         /* [retval][out] */ IDOMRange **range);
    394 
    395     virtual HRESULT STDMETHODCALLTYPE setSelectedDOMRange(
    396         /* [in] */ IDOMRange *range,
    397         /* [in] */ WebSelectionAffinity affinity);
    398 
    399     virtual HRESULT STDMETHODCALLTYPE selectedDOMRange(
    400         /* [retval][out] */ IDOMRange **range);
    401 
    402     virtual HRESULT STDMETHODCALLTYPE selectionAffinity(
    403         /* [retval][out][retval][out] */ WebSelectionAffinity *affinity);
    404 
    405     virtual HRESULT STDMETHODCALLTYPE setEditable(
    406         /* [in] */ BOOL flag);
    407 
    408     virtual HRESULT STDMETHODCALLTYPE isEditable(
    409         /* [retval][out] */ BOOL *isEditable);
    410 
    411     virtual HRESULT STDMETHODCALLTYPE setTypingStyle(
    412         /* [in] */ IDOMCSSStyleDeclaration *style);
    413 
    414     virtual HRESULT STDMETHODCALLTYPE typingStyle(
    415         /* [retval][out] */ IDOMCSSStyleDeclaration **style);
    416 
    417     virtual HRESULT STDMETHODCALLTYPE setSmartInsertDeleteEnabled(
    418         /* [in] */ BOOL flag);
    419 
    420     virtual HRESULT STDMETHODCALLTYPE smartInsertDeleteEnabled(
    421         /* [in] */ BOOL *enabled);
    422 
    423     virtual HRESULT STDMETHODCALLTYPE setSelectTrailingWhitespaceEnabled(
    424         /* [in] */ BOOL flag);
    425 
    426     virtual HRESULT STDMETHODCALLTYPE isSelectTrailingWhitespaceEnabled(
    427         /* [in] */ BOOL *enabled);
    428 
    429     virtual HRESULT STDMETHODCALLTYPE setContinuousSpellCheckingEnabled(
    430         /* [in] */ BOOL flag);
    431 
    432     virtual HRESULT STDMETHODCALLTYPE isContinuousSpellCheckingEnabled(
    433         /* [retval][out] */ BOOL *enabled);
    434 
    435     virtual HRESULT STDMETHODCALLTYPE spellCheckerDocumentTag(
    436         /* [retval][out] */ int *tag);
    437 
    438     virtual HRESULT STDMETHODCALLTYPE undoManager(
    439         /* [retval][out] */ IWebUndoManager **manager);
    440 
    441     virtual HRESULT STDMETHODCALLTYPE setEditingDelegate(
    442         /* [in] */ IWebEditingDelegate *d);
    443 
    444     virtual HRESULT STDMETHODCALLTYPE editingDelegate(
    445         /* [retval][out] */ IWebEditingDelegate **d);
    446 
    447     virtual HRESULT STDMETHODCALLTYPE styleDeclarationWithText(
    448         /* [in] */ BSTR text,
    449         /* [retval][out] */ IDOMCSSStyleDeclaration **style);
    450 
    451     virtual HRESULT STDMETHODCALLTYPE hasSelectedRange(
    452         /* [retval][out] */ BOOL *hasSelectedRange);
    453 
    454     virtual HRESULT STDMETHODCALLTYPE cutEnabled(
    455         /* [retval][out] */ BOOL *enabled);
    456 
    457     virtual HRESULT STDMETHODCALLTYPE copyEnabled(
    458         /* [retval][out] */ BOOL *enabled);
    459 
    460     virtual HRESULT STDMETHODCALLTYPE pasteEnabled(
    461         /* [retval][out] */ BOOL *enabled);
    462 
    463     virtual HRESULT STDMETHODCALLTYPE deleteEnabled(
    464         /* [retval][out] */ BOOL *enabled);
    465 
    466     virtual HRESULT STDMETHODCALLTYPE editingEnabled(
    467         /* [retval][out] */ BOOL *enabled);
    468 
    469     virtual HRESULT STDMETHODCALLTYPE isGrammarCheckingEnabled(
    470         /* [retval][out] */ BOOL *enabled);
    471 
    472     virtual HRESULT STDMETHODCALLTYPE setGrammarCheckingEnabled(
    473         BOOL enabled);
    474 
    475     virtual HRESULT STDMETHODCALLTYPE setPageSizeMultiplier(
    476         /* [in] */ float multiplier);
    477 
    478     virtual HRESULT STDMETHODCALLTYPE pageSizeMultiplier(
    479         /* [retval][out] */ float *multiplier);
    480 
    481     virtual HRESULT STDMETHODCALLTYPE canZoomPageIn(
    482         /* [in] */ IUnknown *sender,
    483         /* [retval][out] */ BOOL *result);
    484 
    485     virtual HRESULT STDMETHODCALLTYPE zoomPageIn(
    486         /* [in] */ IUnknown *sender);
    487 
    488     virtual HRESULT STDMETHODCALLTYPE canZoomPageOut(
    489         /* [in] */ IUnknown *sender,
    490         /* [retval][out] */ BOOL *result);
    491 
    492     virtual HRESULT STDMETHODCALLTYPE zoomPageOut(
    493         /* [in] */ IUnknown *sender);
    494 
    495     virtual HRESULT STDMETHODCALLTYPE canResetPageZoom(
    496         /* [in] */ IUnknown *sender,
    497         /* [retval][out] */ BOOL *result);
    498 
    499     virtual HRESULT STDMETHODCALLTYPE resetPageZoom(
    500         /* [in] */ IUnknown *sender);
    501 
    502     // IWebViewUndoableEditing
    503 
    504     virtual HRESULT STDMETHODCALLTYPE replaceSelectionWithNode(
    505         /* [in] */ IDOMNode *node);
    506 
    507     virtual HRESULT STDMETHODCALLTYPE replaceSelectionWithText(
    508         /* [in] */ BSTR text);
    509 
    510     virtual HRESULT STDMETHODCALLTYPE replaceSelectionWithMarkupString(
    511         /* [in] */ BSTR markupString);
    512 
    513     virtual HRESULT STDMETHODCALLTYPE replaceSelectionWithArchive(
    514         /* [in] */ IWebArchive *archive);
    515 
    516     virtual HRESULT STDMETHODCALLTYPE deleteSelection( void);
    517 
    518     virtual HRESULT STDMETHODCALLTYPE clearSelection(void);
    519 
    520     virtual HRESULT STDMETHODCALLTYPE applyStyle(
    521         /* [in] */ IDOMCSSStyleDeclaration *style);
    522 
    523     // IWebViewEditingActions
    524 
    525     virtual HRESULT STDMETHODCALLTYPE copy(
    526         /* [in] */ IUnknown *sender);
    527 
    528     virtual HRESULT STDMETHODCALLTYPE cut(
    529         /* [in] */ IUnknown *sender);
    530 
    531     virtual HRESULT STDMETHODCALLTYPE paste(
    532         /* [in] */ IUnknown *sender);
    533 
    534     virtual HRESULT STDMETHODCALLTYPE copyURL(
    535         /* [in] */ BSTR url);
    536 
    537     virtual HRESULT STDMETHODCALLTYPE copyFont(
    538         /* [in] */ IUnknown *sender);
    539 
    540     virtual HRESULT STDMETHODCALLTYPE pasteFont(
    541         /* [in] */ IUnknown *sender);
    542 
    543     virtual HRESULT STDMETHODCALLTYPE delete_(
    544         /* [in] */ IUnknown *sender);
    545 
    546     virtual HRESULT STDMETHODCALLTYPE pasteAsPlainText(
    547         /* [in] */ IUnknown *sender);
    548 
    549     virtual HRESULT STDMETHODCALLTYPE pasteAsRichText(
    550         /* [in] */ IUnknown *sender);
    551 
    552     virtual HRESULT STDMETHODCALLTYPE changeFont(
    553         /* [in] */ IUnknown *sender);
    554 
    555     virtual HRESULT STDMETHODCALLTYPE changeAttributes(
    556         /* [in] */ IUnknown *sender);
    557 
    558     virtual HRESULT STDMETHODCALLTYPE changeDocumentBackgroundColor(
    559         /* [in] */ IUnknown *sender);
    560 
    561     virtual HRESULT STDMETHODCALLTYPE changeColor(
    562         /* [in] */ IUnknown *sender);
    563 
    564     virtual HRESULT STDMETHODCALLTYPE alignCenter(
    565         /* [in] */ IUnknown *sender);
    566 
    567     virtual HRESULT STDMETHODCALLTYPE alignJustified(
    568         /* [in] */ IUnknown *sender);
    569 
    570     virtual HRESULT STDMETHODCALLTYPE alignLeft(
    571         /* [in] */ IUnknown *sender);
    572 
    573     virtual HRESULT STDMETHODCALLTYPE alignRight(
    574         /* [in] */ IUnknown *sender);
    575 
    576     virtual HRESULT STDMETHODCALLTYPE checkSpelling(
    577         /* [in] */ IUnknown *sender);
    578 
    579     virtual HRESULT STDMETHODCALLTYPE showGuessPanel(
    580         /* [in] */ IUnknown *sender);
    581 
    582     virtual HRESULT STDMETHODCALLTYPE performFindPanelAction(
    583         /* [in] */ IUnknown *sender);
    584 
    585     virtual HRESULT STDMETHODCALLTYPE startSpeaking(
    586         /* [in] */ IUnknown *sender);
    587 
    588     virtual HRESULT STDMETHODCALLTYPE stopSpeaking(
    589         /* [in] */ IUnknown *sender);
    590 
    591     // IWebNotificationObserver
    592 
    593     virtual HRESULT STDMETHODCALLTYPE onNotify(
    594         /* [in] */ IWebNotification *notification);
    595 
    596     // IWebViewPrivate
    597 
    598     virtual HRESULT STDMETHODCALLTYPE MIMETypeForExtension(
    599         /* [in] */ BSTR extension,
    600         /* [retval][out] */ BSTR *mimeType);
    601 
    602     virtual HRESULT STDMETHODCALLTYPE setCustomDropTarget(
    603         /* [in] */ IDropTarget* dt);
    604 
    605     virtual HRESULT STDMETHODCALLTYPE removeCustomDropTarget();
    606 
    607     virtual HRESULT STDMETHODCALLTYPE setInViewSourceMode(
    608         /* [in] */ BOOL flag);
    609 
    610     virtual HRESULT STDMETHODCALLTYPE inViewSourceMode(
    611         /* [retval][out] */ BOOL* flag);
    612 
    613     virtual HRESULT STDMETHODCALLTYPE viewWindow(
    614         /* [retval][out] */ OLE_HANDLE *window);
    615 
    616     virtual HRESULT STDMETHODCALLTYPE setFormDelegate(
    617         /* [in] */ IWebFormDelegate *formDelegate);
    618 
    619     virtual HRESULT STDMETHODCALLTYPE formDelegate(
    620         /* [retval][out] */ IWebFormDelegate **formDelegate);
    621 
    622     virtual HRESULT STDMETHODCALLTYPE setFrameLoadDelegatePrivate(
    623         /* [in] */ IWebFrameLoadDelegatePrivate *frameLoadDelegatePrivate);
    624 
    625     virtual HRESULT STDMETHODCALLTYPE frameLoadDelegatePrivate(
    626         /* [retval][out] */ IWebFrameLoadDelegatePrivate **frameLoadDelegatePrivate);
    627 
    628     virtual HRESULT STDMETHODCALLTYPE scrollOffset(
    629         /* [retval][out] */ LPPOINT offset);
    630 
    631     virtual HRESULT STDMETHODCALLTYPE scrollBy(
    632         /* [in] */ LPPOINT offset);
    633 
    634     virtual HRESULT STDMETHODCALLTYPE visibleContentRect(
    635         /* [retval][out] */ LPRECT rect);
    636 
    637     virtual HRESULT STDMETHODCALLTYPE updateFocusedAndActiveState();
    638 
    639     virtual HRESULT STDMETHODCALLTYPE executeCoreCommandByName(BSTR name, BSTR value);
    640 
    641     virtual HRESULT STDMETHODCALLTYPE clearMainFrameName();
    642 
    643     virtual HRESULT STDMETHODCALLTYPE markAllMatchesForText(
    644         BSTR search, BOOL caseSensitive, BOOL highlight, UINT limit, UINT* matches);
    645 
    646     virtual HRESULT STDMETHODCALLTYPE unmarkAllTextMatches();
    647 
    648     virtual HRESULT STDMETHODCALLTYPE rectsForTextMatches(
    649         IEnumTextMatches** pmatches);
    650 
    651     virtual HRESULT STDMETHODCALLTYPE generateSelectionImage(
    652         BOOL forceWhiteText, OLE_HANDLE* hBitmap);
    653 
    654     virtual HRESULT STDMETHODCALLTYPE selectionRect(
    655         RECT* rc);
    656 
    657     virtual HRESULT STDMETHODCALLTYPE DragEnter(
    658         IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect);
    659 
    660     virtual HRESULT STDMETHODCALLTYPE DragOver(
    661         DWORD grfKeyState, POINTL pt, DWORD* pdwEffect);
    662 
    663     virtual HRESULT STDMETHODCALLTYPE DragLeave();
    664 
    665     virtual HRESULT STDMETHODCALLTYPE Drop(
    666         IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect);
    667 
    668     virtual HRESULT STDMETHODCALLTYPE canHandleRequest(
    669         IWebURLRequest *request,
    670         BOOL *result);
    671 
    672     virtual HRESULT STDMETHODCALLTYPE standardUserAgentWithApplicationName(
    673         /* [in] */ BSTR applicationName,
    674         /* [retval][out] */ BSTR *groupName);
    675 
    676     virtual HRESULT STDMETHODCALLTYPE clearFocusNode();
    677 
    678     virtual HRESULT STDMETHODCALLTYPE setInitialFocus(
    679         /* [in] */ BOOL forward);
    680 
    681     virtual HRESULT STDMETHODCALLTYPE setTabKeyCyclesThroughElements(
    682         /* [in] */ BOOL cycles);
    683 
    684     virtual HRESULT STDMETHODCALLTYPE tabKeyCyclesThroughElements(
    685         /* [retval][out] */ BOOL *result);
    686 
    687     virtual HRESULT STDMETHODCALLTYPE setAllowSiteSpecificHacks(
    688         /* [in] */ BOOL allows);
    689 
    690     virtual HRESULT STDMETHODCALLTYPE addAdditionalPluginDirectory(
    691         /* [in] */ BSTR directory);
    692 
    693     virtual HRESULT STDMETHODCALLTYPE loadBackForwardListFromOtherView(
    694         /* [in] */ IWebView *otherView);
    695 
    696     virtual HRESULT STDMETHODCALLTYPE inspector(
    697         /* [retval][out] */ IWebInspector**);
    698 
    699     virtual HRESULT STDMETHODCALLTYPE clearUndoRedoOperations( void);
    700     virtual HRESULT STDMETHODCALLTYPE shouldClose(
    701         /* [retval][out] */ BOOL* result);
    702 
    703     virtual HRESULT STDMETHODCALLTYPE setProhibitsMainFrameScrolling(BOOL);
    704     virtual HRESULT STDMETHODCALLTYPE setShouldApplyMacFontAscentHack(BOOL);
    705 
    706     virtual HRESULT STDMETHODCALLTYPE windowAncestryDidChange();
    707 
    708     virtual HRESULT STDMETHODCALLTYPE paintDocumentRectToContext(
    709         /* [in] */ RECT rect,
    710         /* [in] */ OLE_HANDLE dc);
    711 
    712     virtual HRESULT STDMETHODCALLTYPE paintScrollViewRectToContextAtPoint(
    713         /* [in] */ RECT rect,
    714         /* [in] */ POINT pt,
    715         /* [in] */ OLE_HANDLE dc);
    716 
    717     virtual HRESULT STDMETHODCALLTYPE reportException(
    718         /* [in] */ JSContextRef context,
    719         /* [in] */ JSValueRef exception);
    720 
    721     virtual HRESULT STDMETHODCALLTYPE elementFromJS(
    722         /* [in] */ JSContextRef context,
    723         /* [in] */ JSValueRef nodeObject,
    724         /* [retval][out] */ IDOMElement **element);
    725 
    726     virtual HRESULT STDMETHODCALLTYPE setCustomHTMLTokenizerTimeDelay(
    727         /* [in] */ double timeDelay);
    728 
    729     virtual HRESULT STDMETHODCALLTYPE setCustomHTMLTokenizerChunkSize(
    730         /* [in] */ int chunkSize);
    731 
    732     virtual HRESULT STDMETHODCALLTYPE backingStore(
    733         /* [out, retval] */ OLE_HANDLE* hBitmap);
    734 
    735     virtual HRESULT STDMETHODCALLTYPE setTransparent(
    736         /* [in] */ BOOL transparent);
    737 
    738     virtual HRESULT STDMETHODCALLTYPE transparent(
    739         /* [out, retval] */ BOOL* transparent);
    740 
    741     virtual HRESULT STDMETHODCALLTYPE setDefersCallbacks(
    742         /* [in] */ BOOL defersCallbacks);
    743 
    744     virtual HRESULT STDMETHODCALLTYPE defersCallbacks(
    745         /* [out, retval] */ BOOL* defersCallbacks);
    746 
    747     virtual HRESULT STDMETHODCALLTYPE globalHistoryItem(
    748         /* [out, retval] */ IWebHistoryItem** item);
    749 
    750     virtual HRESULT STDMETHODCALLTYPE setAlwaysUsesComplexTextCodePath(
    751         /* [in] */ BOOL complex);
    752 
    753     virtual HRESULT STDMETHODCALLTYPE alwaysUsesComplexTextCodePath(
    754         /* [out, retval] */ BOOL* complex);
    755 
    756     virtual HRESULT STDMETHODCALLTYPE setCookieEnabled(
    757         /* [in] */ BOOL enable);
    758 
    759     virtual HRESULT STDMETHODCALLTYPE cookieEnabled(
    760         /* [out, retval] */ BOOL* enabled);
    761 
    762     virtual HRESULT STDMETHODCALLTYPE setMediaVolume(
    763         /* [in] */ float volume);
    764 
    765     virtual HRESULT STDMETHODCALLTYPE mediaVolume(
    766         /* [out, retval] */ float* volume);
    767 
    768     virtual HRESULT STDMETHODCALLTYPE registerEmbeddedViewMIMEType(
    769         /* [in] */ BSTR mimeType);
    770 
    771     virtual HRESULT STDMETHODCALLTYPE setMemoryCacheDelegateCallsEnabled(
    772         /* [in] */ BOOL enabled);
    773 
    774     virtual HRESULT STDMETHODCALLTYPE setJavaScriptURLsAreAllowed(
    775         /* [in] */ BOOL areAllowed);
    776 
    777     virtual HRESULT STDMETHODCALLTYPE setCanStartPlugins(
    778         /* [in] */ BOOL canStartPlugins);
    779 
    780     virtual HRESULT STDMETHODCALLTYPE addUserScriptToGroup(BSTR groupName, IWebScriptWorld*, BSTR source, BSTR url,
    781                                                            unsigned whitelistCount, BSTR* whitelist,
    782                                                            unsigned blacklistCount, BSTR* blacklist,
    783                                                            WebUserScriptInjectionTime);
    784     virtual HRESULT STDMETHODCALLTYPE addUserStyleSheetToGroup(BSTR groupName, IWebScriptWorld*, BSTR source, BSTR url,
    785                                                                unsigned whitelistCount, BSTR* whitelist,
    786                                                                unsigned blacklistCount, BSTR* blacklist);
    787     virtual HRESULT STDMETHODCALLTYPE removeUserScriptFromGroup(BSTR groupName, IWebScriptWorld*, BSTR url);
    788     virtual HRESULT STDMETHODCALLTYPE removeUserStyleSheetFromGroup(BSTR groupName, IWebScriptWorld*, BSTR url);
    789     virtual HRESULT STDMETHODCALLTYPE removeUserScriptsFromGroup(BSTR groupName, IWebScriptWorld*);
    790     virtual HRESULT STDMETHODCALLTYPE removeUserStyleSheetsFromGroup(BSTR groupName, IWebScriptWorld*);
    791     virtual HRESULT STDMETHODCALLTYPE removeAllUserContentFromGroup(BSTR groupName);
    792 
    793     virtual HRESULT STDMETHODCALLTYPE setPluginHalterDelegate(IWebPluginHalterDelegate*);
    794     virtual HRESULT STDMETHODCALLTYPE pluginHalterDelegate(IWebPluginHalterDelegate**);
    795 
    796     virtual HRESULT STDMETHODCALLTYPE invalidateBackingStore(const RECT*);
    797 
    798     virtual HRESULT STDMETHODCALLTYPE addOriginAccessWhitelistEntry(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains);
    799     virtual HRESULT STDMETHODCALLTYPE removeOriginAccessWhitelistEntry(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains);
    800     virtual HRESULT STDMETHODCALLTYPE resetOriginAccessWhitelists();
    801 
    802     virtual HRESULT STDMETHODCALLTYPE setHistoryDelegate(IWebHistoryDelegate* historyDelegate);
    803     virtual HRESULT STDMETHODCALLTYPE historyDelegate(IWebHistoryDelegate** historyDelegate);
    804     virtual HRESULT STDMETHODCALLTYPE addVisitedLinks(BSTR* visitedURLs, unsigned visitedURLCount);
    805 
    806     virtual HRESULT STDMETHODCALLTYPE isNodeHaltedPlugin(IDOMNode*, BOOL*);
    807     virtual HRESULT STDMETHODCALLTYPE restartHaltedPluginForNode(IDOMNode*);
    808     virtual HRESULT STDMETHODCALLTYPE hasPluginForNodeBeenHalted(IDOMNode*, BOOL*);
    809 
    810     virtual HRESULT STDMETHODCALLTYPE setGeolocationProvider(IWebGeolocationProvider* locationProvider);
    811     virtual HRESULT STDMETHODCALLTYPE geolocationProvider(IWebGeolocationProvider** locationProvider);
    812     virtual HRESULT STDMETHODCALLTYPE geolocationDidChangePosition(IWebGeolocationPosition* position);
    813     virtual HRESULT STDMETHODCALLTYPE geolocationDidFailWithError(IWebError* error);
    814 
    815     virtual HRESULT STDMETHODCALLTYPE setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR scheme);
    816     virtual HRESULT STDMETHODCALLTYPE registerURLSchemeAsSecure(BSTR);
    817 
    818     virtual HRESULT STDMETHODCALLTYPE nextDisplayIsSynchronous();
    819 
    820     virtual HRESULT STDMETHODCALLTYPE defaultMinimumTimerInterval(
    821         /* [retval][out] */ double *interval);
    822 
    823     virtual HRESULT STDMETHODCALLTYPE setMinimumTimerInterval(
    824         /* [in] */ double);
    825 
    826     // WebView
    827     bool shouldUseEmbeddedView(const WTF::String& mimeType) const;
    828 
    829     WebCore::Page* page();
    830     bool handleMouseEvent(UINT, WPARAM, LPARAM);
    831     void setMouseActivated(bool flag) { m_mouseActivated = flag; }
    832     bool handleContextMenuEvent(WPARAM, LPARAM);
    833     bool onMeasureItem(WPARAM, LPARAM);
    834     bool onDrawItem(WPARAM, LPARAM);
    835     bool onInitMenuPopup(WPARAM, LPARAM);
    836     bool onUninitMenuPopup(WPARAM, LPARAM);
    837     void performContextMenuAction(WPARAM, LPARAM, bool byPosition);
    838     bool mouseWheel(WPARAM, LPARAM, bool isMouseHWheel);
    839     bool verticalScroll(WPARAM, LPARAM);
    840     bool horizontalScroll(WPARAM, LPARAM);
    841     bool gesture(WPARAM, LPARAM);
    842     bool gestureNotify(WPARAM, LPARAM);
    843     bool execCommand(WPARAM wParam, LPARAM lParam);
    844     bool keyDown(WPARAM, LPARAM, bool systemKeyDown = false);
    845     bool keyUp(WPARAM, LPARAM, bool systemKeyDown = false);
    846     bool keyPress(WPARAM, LPARAM, bool systemKeyDown = false);
    847     void paint(HDC, LPARAM);
    848     void paintIntoWindow(HDC bitmapDC, HDC windowDC, const WebCore::IntRect& dirtyRect);
    849     bool ensureBackingStore();
    850     void addToDirtyRegion(const WebCore::IntRect&);
    851     void addToDirtyRegion(HRGN);
    852     void scrollBackingStore(WebCore::FrameView*, int dx, int dy, const WebCore::IntRect& scrollViewRect, const WebCore::IntRect& clipRect);
    853     void deleteBackingStore();
    854     void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false);
    855     void frameRect(RECT* rect);
    856     void closeWindow();
    857     void closeWindowSoon();
    858     void closeWindowTimerFired();
    859     bool didClose() const { return m_didClose; }
    860 
    861     bool transparent() const { return m_transparent; }
    862 
    863     bool onIMEStartComposition();
    864     bool onIMEComposition(LPARAM);
    865     bool onIMEEndComposition();
    866     bool onIMEChar(WPARAM, LPARAM);
    867     bool onIMENotify(WPARAM, LPARAM, LRESULT*);
    868     LRESULT onIMERequest(WPARAM, LPARAM);
    869     bool onIMESelect(WPARAM, LPARAM);
    870     bool onIMESetContext(WPARAM, LPARAM);
    871     void selectionChanged();
    872     void resetIME(WebCore::Frame*);
    873     void setInputMethodState(bool);
    874 
    875     HRESULT registerDragDrop();
    876     HRESULT revokeDragDrop();
    877 
    878     // Convenient to be able to violate the rules of COM here for easy movement to the frame.
    879     WebFrame* topLevelFrame() const { return m_mainFrame; }
    880     const WTF::String& userAgentForKURL(const WebCore::KURL& url);
    881 
    882     static bool canHandleRequest(const WebCore::ResourceRequest&);
    883 
    884     static WTF::String standardUserAgentWithApplicationName(const WTF::String&);
    885 
    886     void setIsBeingDestroyed();
    887     bool isBeingDestroyed() const { return m_isBeingDestroyed; }
    888 
    889     const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
    890     bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*);
    891 
    892     bool isPainting() const { return m_paintCount > 0; }
    893 
    894     void setToolTip(const WTF::String&);
    895 
    896     void registerForIconNotification(bool listen);
    897     void dispatchDidReceiveIconFromWebFrame(WebFrame*);
    898 
    899     HRESULT notifyDidAddIcon(IWebNotification*);
    900     HRESULT notifyPreferencesChanged(IWebNotification*);
    901 
    902     static void setCacheModel(WebCacheModel);
    903     static WebCacheModel cacheModel();
    904     static bool didSetCacheModel();
    905     static WebCacheModel maxCacheModelInAnyInstance();
    906 
    907     void updateActiveStateSoon() const;
    908     void deleteBackingStoreSoon();
    909     void cancelDeleteBackingStoreSoon();
    910 
    911     HWND topLevelParent() const { return m_topLevelParent; }
    912     HWND viewWindow() const { return m_viewWindow; }
    913 
    914     void updateActiveState();
    915 
    916     bool onGetObject(WPARAM, LPARAM, LRESULT&) const;
    917     static STDMETHODIMP AccessibleObjectFromWindow(HWND, DWORD objectID, REFIID, void** ppObject);
    918 
    919     void downloadURL(const WebCore::KURL&);
    920 
    921 #if USE(ACCELERATED_COMPOSITING)
    922     void flushPendingGraphicsLayerChangesSoon();
    923     void setRootChildLayer(WebCore::GraphicsLayer*);
    924 #endif
    925 
    926     void enterFullscreenForNode(WebCore::Node*);
    927     void exitFullscreen();
    928 
    929     void setLastCursor(HCURSOR cursor) { m_lastSetCursor = cursor; }
    930 
    931     void setGlobalHistoryItem(WebCore::HistoryItem*);
    932 
    933 private:
    934     void setZoomMultiplier(float multiplier, bool isTextOnly);
    935     float zoomMultiplier(bool isTextOnly);
    936     bool canZoomIn(bool isTextOnly);
    937     HRESULT zoomIn(bool isTextOnly);
    938     bool canZoomOut(bool isTextOnly);
    939     HRESULT zoomOut(bool isTextOnly);
    940     bool canResetZoom(bool isTextOnly);
    941     HRESULT resetZoom(bool isTextOnly);
    942     bool active();
    943 
    944     void sizeChanged(const WebCore::IntSize&);
    945 
    946     enum WindowsToPaint { PaintWebViewOnly, PaintWebViewAndChildren };
    947     void paintIntoBackingStore(WebCore::FrameView*, HDC bitmapDC, const WebCore::IntRect& dirtyRect, WindowsToPaint);
    948     void updateBackingStore(WebCore::FrameView*, HDC = 0, bool backingStoreCompletelyDirty = false, WindowsToPaint = PaintWebViewOnly);
    949 
    950     WebCore::DragOperation keyStateToDragOperation(DWORD grfKeyState) const;
    951 
    952     // FIXME: This variable is part of a workaround. The drop effect (pdwEffect) passed to Drop is incorrect.
    953     // We set this variable in DragEnter and DragOver so that it can be used in Drop to set the correct drop effect.
    954     // Thus, on return from DoDragDrop we have the correct pdwEffect for the drag-and-drop operation.
    955     // (see https://bugs.webkit.org/show_bug.cgi?id=29264)
    956     DWORD m_lastDropEffect;
    957 
    958 #if USE(ACCELERATED_COMPOSITING)
    959     // GraphicsLayerClient
    960     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time);
    961     virtual void notifySyncRequired(const WebCore::GraphicsLayer*);
    962     virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip);
    963     virtual bool showDebugBorders() const;
    964     virtual bool showRepaintCounter() const;
    965 
    966     // CACFLayerTreeHostClient
    967     virtual void flushPendingGraphicsLayerChanges();
    968 #endif
    969 
    970 protected:
    971     static bool registerWebViewWindowClass();
    972     static LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
    973 
    974     HIMC getIMMContext();
    975     void releaseIMMContext(HIMC);
    976     static bool allowSiteSpecificHacks() { return s_allowSiteSpecificHacks; }
    977     void preflightSpellChecker();
    978     bool continuousCheckingAllowed();
    979     void initializeToolTipWindow();
    980     void prepareCandidateWindow(WebCore::Frame*, HIMC);
    981     void updateSelectionForIME();
    982     LRESULT onIMERequestCharPosition(WebCore::Frame*, IMECHARPOSITION*);
    983     LRESULT onIMERequestReconvertString(WebCore::Frame*, RECONVERTSTRING*);
    984     bool developerExtrasEnabled() const;
    985 
    986     bool shouldInitializeTrackPointHack();
    987 
    988     // AllWebViewSet functions
    989     void addToAllWebViewsSet();
    990     void removeFromAllWebViewsSet();
    991 
    992     virtual void windowReceivedMessage(HWND, UINT message, WPARAM, LPARAM);
    993 
    994     ULONG m_refCount;
    995 #if !ASSERT_DISABLED
    996     bool m_deletionHasBegun;
    997 #endif
    998     HWND m_hostWindow;
    999     HWND m_viewWindow;
   1000     WebFrame* m_mainFrame;
   1001     WebCore::Page* m_page;
   1002 
   1003     RefPtr<RefCountedHBITMAP> m_backingStoreBitmap;
   1004     SIZE m_backingStoreSize;
   1005     RefPtr<RefCountedHRGN> m_backingStoreDirtyRegion;
   1006 
   1007     COMPtr<IWebEditingDelegate> m_editingDelegate;
   1008     COMPtr<IWebFrameLoadDelegate> m_frameLoadDelegate;
   1009     COMPtr<IWebFrameLoadDelegatePrivate> m_frameLoadDelegatePrivate;
   1010     COMPtr<IWebUIDelegate> m_uiDelegate;
   1011     COMPtr<IWebUIDelegatePrivate> m_uiDelegatePrivate;
   1012     COMPtr<IWebFormDelegate> m_formDelegate;
   1013     COMPtr<IWebPolicyDelegate> m_policyDelegate;
   1014     COMPtr<IWebResourceLoadDelegate> m_resourceLoadDelegate;
   1015     COMPtr<IWebDownloadDelegate> m_downloadDelegate;
   1016     COMPtr<IWebHistoryDelegate> m_historyDelegate;
   1017     COMPtr<WebPreferences> m_preferences;
   1018     COMPtr<WebInspector> m_webInspector;
   1019     COMPtr<IWebPluginHalterDelegate> m_pluginHalterDelegate;
   1020     COMPtr<IWebGeolocationProvider> m_geolocationProvider;
   1021 
   1022     bool m_userAgentOverridden;
   1023     bool m_useBackForwardList;
   1024     WTF::String m_userAgentCustom;
   1025     WTF::String m_userAgentStandard;
   1026     float m_zoomMultiplier;
   1027     bool m_zoomsTextOnly;
   1028     WTF::String m_overrideEncoding;
   1029     WTF::String m_applicationName;
   1030     bool m_mouseActivated;
   1031     // WebCore dragging logic needs to be able to inspect the drag data
   1032     // this is updated in DragEnter/Leave/Drop
   1033     COMPtr<IDataObject> m_dragData;
   1034     COMPtr<IDropTargetHelper> m_dropTargetHelper;
   1035     UChar m_currentCharacterCode;
   1036     bool m_isBeingDestroyed;
   1037     unsigned m_paintCount;
   1038     bool m_hasSpellCheckerDocumentTag;
   1039     bool m_smartInsertDeleteEnabled;
   1040     bool m_selectTrailingWhitespaceEnabled;
   1041     bool m_didClose;
   1042     bool m_hasCustomDropTarget;
   1043     unsigned m_inIMEComposition;
   1044     HWND m_toolTipHwnd;
   1045     WTF::String m_toolTip;
   1046     bool m_deleteBackingStoreTimerActive;
   1047 
   1048     bool m_transparent;
   1049 
   1050     static bool s_allowSiteSpecificHacks;
   1051 
   1052     WebCore::SuspendableTimer* m_closeWindowTimer;
   1053     OwnPtr<TRACKMOUSEEVENT> m_mouseOutTracker;
   1054 
   1055     HWND m_topLevelParent;
   1056 
   1057     OwnPtr<HashSet<WTF::String> > m_embeddedViewMIMETypes;
   1058 
   1059     //Variables needed to store gesture information
   1060     RefPtr<WebCore::Node> m_gestureTargetNode;
   1061     long m_lastPanX;
   1062     long m_lastPanY;
   1063     long m_xOverpan;
   1064     long m_yOverpan;
   1065 
   1066 #if ENABLE(VIDEO)
   1067     OwnPtr<FullscreenVideoController> m_fullscreenController;
   1068 #endif
   1069 
   1070 #if USE(ACCELERATED_COMPOSITING)
   1071     bool isAcceleratedCompositing() const { return m_isAcceleratedCompositing; }
   1072     void setAcceleratedCompositing(bool);
   1073 
   1074     RefPtr<WebCore::CACFLayerTreeHost> m_layerTreeHost;
   1075     OwnPtr<WebCore::GraphicsLayer> m_backingLayer;
   1076     bool m_isAcceleratedCompositing;
   1077 #endif
   1078 
   1079     bool m_nextDisplayIsSynchronous;
   1080 
   1081     HCURSOR m_lastSetCursor;
   1082 
   1083     RefPtr<WebCore::HistoryItem> m_globalHistoryItem;
   1084 };
   1085 
   1086 #endif
   1087