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